mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
add client/transit tunnel count in webui
This commit is contained in:
parent
9378668e52
commit
1dc6cec1aa
@ -448,12 +448,12 @@ namespace util
|
||||
s << "<b>Floodfills:</b> " << i2p::data::netdb.GetNumFloodfills () << " ";
|
||||
s << "<b>LeaseSets:</b> " << i2p::data::netdb.GetNumLeaseSets () << "<br>\r\n";
|
||||
|
||||
size_t clientTunnelCount = i2p::tunnel::tunnels.CountOutboundTunnels();
|
||||
clientTunnelCount += i2p::tunnel::tunnels.CountInboundTunnels();
|
||||
size_t transitTunnelCount = i2p::tunnel::tunnels.CountTransitTunnels();
|
||||
|
||||
s << "<b>Client Tunnels:</b> " << std::to_string(clientTunnelCount) << " ";
|
||||
s << "<b>Transit Tunnels:</b> " << std::to_string(transitTunnelCount) << "<br>\r\n";
|
||||
size_t clientTunnelCount = i2p::tunnel::tunnels.CountOutboundTunnels();
|
||||
clientTunnelCount += i2p::tunnel::tunnels.CountInboundTunnels();
|
||||
size_t transitTunnelCount = i2p::tunnel::tunnels.CountTransitTunnels();
|
||||
|
||||
s << "<b>Client Tunnels:</b> " << std::to_string(clientTunnelCount) << " ";
|
||||
s << "<b>Transit Tunnels:</b> " << std::to_string(transitTunnelCount) << "<br>\r\n";
|
||||
}
|
||||
|
||||
void HTTPConnection::HandleCommand (const std::string& command, std::stringstream& s)
|
||||
|
24
Tunnel.cpp
24
Tunnel.cpp
@ -795,20 +795,20 @@ namespace tunnel
|
||||
return timeout;
|
||||
}
|
||||
|
||||
size_t Tunnels::CountTransitTunnels() {
|
||||
// TODO: locking
|
||||
return m_TransitTunnels.size();
|
||||
}
|
||||
size_t Tunnels::CountTransitTunnels() {
|
||||
// TODO: locking
|
||||
return m_TransitTunnels.size();
|
||||
}
|
||||
|
||||
size_t Tunnels::CountInboundTunnels() {
|
||||
// TODO: locking
|
||||
return m_InboundTunnels.size();
|
||||
}
|
||||
size_t Tunnels::CountInboundTunnels() {
|
||||
// TODO: locking
|
||||
return m_InboundTunnels.size();
|
||||
}
|
||||
|
||||
size_t Tunnels::CountOutboundTunnels() {
|
||||
// TODO: locking
|
||||
return m_OutboundTunnels.size();
|
||||
}
|
||||
size_t Tunnels::CountOutboundTunnels() {
|
||||
// TODO: locking
|
||||
return m_OutboundTunnels.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
8
Tunnel.h
8
Tunnel.h
@ -202,10 +202,10 @@ namespace tunnel
|
||||
const decltype(m_InboundTunnels)& GetInboundTunnels () const { return m_InboundTunnels; };
|
||||
const decltype(m_TransitTunnels)& GetTransitTunnels () const { return m_TransitTunnels; };
|
||||
|
||||
size_t CountTransitTunnels();
|
||||
size_t CountInboundTunnels();
|
||||
size_t CountOutboundTunnels();
|
||||
|
||||
size_t CountTransitTunnels();
|
||||
size_t CountInboundTunnels();
|
||||
size_t CountOutboundTunnels();
|
||||
|
||||
int GetQueueSize () { return m_Queue.GetSize (); };
|
||||
int GetTunnelCreationSuccessRate () const // in percents
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user