diff --git a/.gitignore b/.gitignore
index 5424262f..353d839f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -262,3 +262,5 @@ qt/i2pd_qt/*.ui.autosave
qt/i2pd_qt/*.ui.bk*
qt/i2pd_qt/*.ui_*
+#unknown android stuff
+android/libs/
diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp
index 52feeb10..d491e8a0 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";
@@ -271,7 +273,7 @@ namespace http {
s << "Transit Tunnels: " << std::to_string(transitTunnelCount) << "
\r\n";
}
- static void ShowLocalDestinations (std::stringstream& s)
+ void ShowLocalDestinations (std::stringstream& s)
{
s << "Local Destinations:
\r\n
\r\n";
for (auto& it: i2p::client::context.GetDestinations ())
@@ -339,7 +341,7 @@ namespace http {
s << "
" << std::endl;
}
- static void ShowLocalDestination (std::stringstream& s, const std::string& b32)
+ void ShowLocalDestination (std::stringstream& s, const std::string& b32)
{
s << "Local Destination:
\r\n
\r\n";
i2p::data::IdentHash ident;
@@ -397,7 +399,7 @@ namespace http {
ShowError(s, "I2CP is not enabled");
}
- static void ShowLeasesSets(std::stringstream& s)
+ void ShowLeasesSets(std::stringstream& s)
{
s << "LeaseSets (click on to show info):
\r\n";
int counter = 1;
@@ -430,7 +432,7 @@ namespace http {
// end for each lease set
}
- static void ShowTunnels (std::stringstream& s)
+ void ShowTunnels (std::stringstream& s)
{
s << "Queue size: " << i2p::tunnel::tunnels.GetQueueSize () << "
\r\n";
@@ -452,7 +454,7 @@ namespace http {
s << "
\r\n";
}
- static void ShowCommands (std::stringstream& s, uint32_t token)
+ static void ShowCommands (std::stringstream& s, uint32_t token)
{
/* commands */
s << "Router Commands
\r\n";
@@ -474,7 +476,7 @@ namespace http {
s << " Force shutdown
\r\n";
}
- static void ShowTransitTunnels (std::stringstream& s)
+ void ShowTransitTunnels (std::stringstream& s)
{
s << "Transit tunnels:
\r\n
\r\n";
for (const auto& it: i2p::tunnel::tunnels.GetTransitTunnels ())
@@ -489,7 +491,7 @@ namespace http {
}
}
- static void ShowTransports (std::stringstream& s)
+ void ShowTransports (std::stringstream& s)
{
s << "Transports:
\r\n
\r\n";
auto ntcpServer = i2p::transport::transports.GetNTCPServer ();
@@ -575,7 +577,7 @@ namespace http {
}
}
- static void ShowSAMSessions (std::stringstream& s)
+ void ShowSAMSessions (std::stringstream& s)
{
auto sam = i2p::client::context.GetSAMBridge ();
if (!sam) {
@@ -622,7 +624,7 @@ namespace http {
}
}
- static void ShowI2PTunnels (std::stringstream& s)
+ void ShowI2PTunnels (std::stringstream& s)
{
s << "Client Tunnels:
\r\n
\r\n";
for (auto& it: i2p::client::context.GetClientTunnels ())
@@ -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..ec718532 100644
--- a/daemon/HTTPServer.h
+++ b/daemon/HTTPServer.h
@@ -7,6 +7,7 @@
#include