diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 9c039df4..0c6747b4 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -122,7 +122,7 @@ namespace http { s << numKBytes / 1024 / 1024 << " GiB"; } - static void ShowTunnelDetails (std::stringstream& s, enum i2p::tunnel::TunnelState eState, int bytes) + static void ShowTunnelDetails (std::stringstream& s, enum i2p::tunnel::TunnelState eState, bool explr, int bytes) { std::string state; switch (eState) { @@ -135,7 +135,7 @@ namespace http { case i2p::tunnel::eTunnelStateEstablished : state = "established"; break; default: state = "unknown"; break; } - s << " " << state << ", "; + s << " " << state << ((explr) ? " (exploratory)" : "") << ", "; s << " " << (int) (bytes / 1024) << " KiB
\r\n"; } @@ -332,7 +332,7 @@ namespace http { it->Print(s); if(it->LatencyIsKnown()) s << " ( " << it->GetMeanLatency() << "ms )"; - ShowTunnelDetails(s, it->GetState (), it->GetNumReceivedBytes ()); + ShowTunnelDetails(s, it->GetState (), false, it->GetNumReceivedBytes ()); } s << "
\r\n"; s << "Outbound tunnels:
\r\n"; @@ -340,7 +340,7 @@ namespace http { it->Print(s); if(it->LatencyIsKnown()) s << " ( " << it->GetMeanLatency() << "ms )"; - ShowTunnelDetails(s, it->GetState (), it->GetNumSentBytes ()); + ShowTunnelDetails(s, it->GetState (), false, it->GetNumSentBytes ()); } } s << "
\r\n"; @@ -449,12 +449,14 @@ namespace http { s << "Tunnels:
\r\n
\r\n"; s << "Queue size: " << i2p::tunnel::tunnels.GetQueueSize () << "
\r\n"; + auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool (); + s << "Inbound tunnels:
\r\n"; for (auto & it : i2p::tunnel::tunnels.GetInboundTunnels ()) { it->Print(s); if(it->LatencyIsKnown()) s << " ( " << it->GetMeanLatency() << "ms )"; - ShowTunnelDetails(s, it->GetState (), it->GetNumReceivedBytes ()); + ShowTunnelDetails(s, it->GetState (), (it->GetTunnelPool () == ExplPool), it->GetNumReceivedBytes ()); } s << "
\r\n"; s << "Outbound tunnels:
\r\n"; @@ -462,7 +464,7 @@ namespace http { it->Print(s); if(it->LatencyIsKnown()) s << " ( " << it->GetMeanLatency() << "ms )"; - ShowTunnelDetails(s, it->GetState (), it->GetNumSentBytes ()); + ShowTunnelDetails(s, it->GetState (), (it->GetTunnelPool () == ExplPool), it->GetNumSentBytes ()); } s << "
\r\n"; }