diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp
index 52feeb10..1f7dbc7b 100644
--- a/daemon/HTTPServer.cpp
+++ b/daemon/HTTPServer.cpp
@@ -185,7 +185,7 @@ namespace http {
s << "ERROR: " << string << "
\r\n";
}
- static void ShowStatus (std::stringstream& s)
+ void ShowStatus (std::stringstream& s, bool includeHiddenContent)
{
s << "Uptime: ";
ShowUptime(s, i2p::context.GetUptime ());
@@ -233,33 +233,35 @@ namespace http {
s << " (" << (double) i2p::transport::transports.GetTransitBandwidth () / 1024 << " KiB/s)
\r\n";
s << "Data path: " << i2p::fs::GetDataDir() << "
\r\n";
s << "
\r\n
\r\n
\r\n";
- s << "Router Ident: " << i2p::context.GetRouterInfo().GetIdentHashBase64() << "
\r\n";
- s << "Router Family: " << i2p::context.GetRouterInfo().GetProperty("family") << "
\r\n";
- s << "Router Caps: " << i2p::context.GetRouterInfo().GetProperty("caps") << "
\r\n";
- s << "Our external address:" << "
\r\n" ;
- for (const auto& address : i2p::context.GetRouterInfo().GetAddresses())
- {
- switch (address->transportStyle)
- {
- case i2p::data::RouterInfo::eTransportNTCP:
- if (address->host.is_v6 ())
- s << "NTCP6 ";
- else
- s << "NTCP ";
- break;
- case i2p::data::RouterInfo::eTransportSSU:
- if (address->host.is_v6 ())
- s << "SSU6 ";
- else
- s << "SSU ";
- break;
- default:
- s << "Unknown ";
- }
- s << address->host.to_string() << ":" << address->port << "
\r\n";
- }
- s << "
\r\n
\r\n";
- s << "Routers: " << i2p::data::netdb.GetNumRouters () << " ";
+ if(includeHiddenContent) {
+ s << "Router Ident: " << i2p::context.GetRouterInfo().GetIdentHashBase64() << "
\r\n";
+ s << "Router Family: " << i2p::context.GetRouterInfo().GetProperty("family") << "
\r\n";
+ s << "Router Caps: " << i2p::context.GetRouterInfo().GetProperty("caps") << "
\r\n";
+ s << "Our external address:" << "
\r\n" ;
+ for (const auto& address : i2p::context.GetRouterInfo().GetAddresses())
+ {
+ switch (address->transportStyle)
+ {
+ case i2p::data::RouterInfo::eTransportNTCP:
+ if (address->host.is_v6 ())
+ s << "NTCP6 ";
+ else
+ s << "NTCP ";
+ break;
+ case i2p::data::RouterInfo::eTransportSSU:
+ if (address->host.is_v6 ())
+ s << "SSU6 ";
+ else
+ s << "SSU ";
+ break;
+ default:
+ s << "Unknown ";
+ }
+ s << address->host.to_string() << ":" << address->port << "
\r\n";
+ }
+ }
+ s << "\r\n\r\n";
+ s << "Routers: " << i2p::data::netdb.GetNumRouters () << " ";
s << "Floodfills: " << i2p::data::netdb.GetNumFloodfills () << " ";
s << "LeaseSets: " << i2p::data::netdb.GetNumLeaseSets () << "
\r\n";
@@ -797,7 +799,7 @@ namespace http {
} else if (req.uri.find("cmd=") != std::string::npos) {
HandleCommand (req, res, s);
} else {
- ShowStatus (s);
+ ShowStatus (s, true);
res.add_header("Refresh", "10");
}
ShowPageTail (s);
diff --git a/daemon/HTTPServer.h b/daemon/HTTPServer.h
index ec56e08a..edff1bf3 100644
--- a/daemon/HTTPServer.h
+++ b/daemon/HTTPServer.h
@@ -7,6 +7,7 @@
#include