mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
add webui for udp tunnels
This commit is contained in:
parent
9acbb2203c
commit
fa1021df59
7 changed files with 181 additions and 3 deletions
|
@ -337,7 +337,38 @@ namespace http {
|
|||
s << "<td>" << it->GetWindowSize () << "</td>";
|
||||
s << "<td>" << (int)it->GetStatus () << "</td>";
|
||||
s << "</tr><br>\r\n" << std::endl;
|
||||
}
|
||||
s << "</table><br>\r\n<table><caption>Forwards</caption><tr>";
|
||||
s << "<th>Remote Destination</th>";
|
||||
s << "<th>IBGW</th>";
|
||||
s << "<th>OBEP</th>";
|
||||
s << "<th>UDP Converstation</th>";
|
||||
s << "<th>Idle Time</th>";
|
||||
s << "</th>";
|
||||
auto forward = i2p::client::context.GetForwardInfosFor(dest->GetIdentHash());
|
||||
for (auto & info : forward)
|
||||
{
|
||||
s << "<tr>";
|
||||
s << "<td>" << info.RemoteIdent.ToBase32() << "</td>";
|
||||
s << "<td>";
|
||||
if(info.CurrentIBGW)
|
||||
s << info.CurrentIBGW->ToBase64();
|
||||
else
|
||||
s << "(none)";
|
||||
s << "</td>";
|
||||
|
||||
s << "<td>";
|
||||
if(info.CurrentOBEP)
|
||||
s << info.CurrentOBEP->ToBase64();
|
||||
else
|
||||
s << "(none)";
|
||||
s << "</td>";
|
||||
s << "<td>" << info.LocalEndpoint << " ⇄ " << info.RemoteEndpoint << "</td>";
|
||||
auto sec = std::chrono::duration<float, std::ratio<1000, 1 > >( std::chrono::milliseconds(info.idle) );
|
||||
s << "<td>" << sec.count() << " seconds </td>";
|
||||
s << "</tr><br>\r\n";
|
||||
}
|
||||
s << "</table>\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue