From 7f26296759bee13855786caf25b75962850ce2f6 Mon Sep 17 00:00:00 2001 From: chertov Date: Thu, 13 Mar 2014 08:10:05 +0400 Subject: [PATCH] =?UTF-8?q?adding=20files=20to=20=D0=B0=20VS=20project,=20?= =?UTF-8?q?showed=20external=20ip=20on=20statistics=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HTTPServer.cpp | 14 ++++++++++++++ Win32/i2pd.vcxproj | 2 ++ Win32/i2pd.vcxproj.filters | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index d71deb3c..ec655709 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -118,6 +118,20 @@ namespace util void HTTPConnection::FillContent (std::stringstream& s) { + s << "Our external address:" << "
" << "
"; + for (auto& address : i2p::context.GetRouterInfo().GetAddresses()) + { + switch (address.transportStyle) { + case i2p::data::RouterInfo::eTransportNTCP: + s << "NTCP  "; + break; + case i2p::data::RouterInfo::eTransportSSU: + s << "SSU     "; + break; + } + s << address.host.to_string() << ":" << address.port << "
"; + } + s << "

Tunnels

"; for (auto it: i2p::tunnel::tunnels.GetOutboundTunnels ()) { diff --git a/Win32/i2pd.vcxproj b/Win32/i2pd.vcxproj index c6f95ed7..f32f7cb4 100644 --- a/Win32/i2pd.vcxproj +++ b/Win32/i2pd.vcxproj @@ -32,6 +32,7 @@ + @@ -62,6 +63,7 @@ + diff --git a/Win32/i2pd.vcxproj.filters b/Win32/i2pd.vcxproj.filters index 0eb7dc3d..f703bd80 100644 --- a/Win32/i2pd.vcxproj.filters +++ b/Win32/i2pd.vcxproj.filters @@ -81,6 +81,9 @@ Source Files + + Source Files + @@ -167,5 +170,8 @@ Header Files + + Header Files + \ No newline at end of file