[tunnels] count outbound traffic for zero-hop tunnels

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2021-08-01 09:25:02 +03:00
parent 1e01c30e63
commit d88fe203e1
No known key found for this signature in database
GPG Key ID: 66F6C87B98EBCFE2
2 changed files with 3 additions and 2 deletions

View File

@ -492,7 +492,7 @@ namespace http {
s << "<div class=\"listitem\">";
it->Print(s);
if(it->LatencyIsKnown())
s << " ( " << it->GetMeanLatency() << tr("ms") << " )";
s << " ( " << it->GetMeanLatency() << tr("ms") << " )";
ShowTunnelDetails(s, it->GetState (), false, it->GetNumSentBytes ());
s << "</div>\r\n";
}

View File

@ -328,10 +328,11 @@ namespace tunnel
for (auto& msg : msgs)
{
if (!msg.data) continue;
m_NumSentBytes += msg.data->GetLength ();
switch (msg.deliveryType)
{
case eDeliveryTypeLocal:
i2p::HandleI2NPMessage (msg.data);
HandleI2NPMessage (msg.data);
break;
case eDeliveryTypeTunnel:
i2p::transport::transports.SendMessage (msg.hash, i2p::CreateTunnelGatewayMsg (msg.tunnelID, msg.data));