Browse Source

print direction of SSU session

pull/46/head
orignal 11 years ago
parent
commit
27c7ea2801
  1. 7
      HTTPServer.cpp
  2. 1
      SSU.h

7
HTTPServer.cpp

@ -164,8 +164,13 @@ namespace util @@ -164,8 +164,13 @@ namespace util
s << "<BR>SSU<BR>";
for (auto it: ssuServer->GetSessions ())
{
// incoming connections don't have remote router
bool outgoing = it.second->GetRemoteRouter ();
auto endpoint = it.second->GetRemoteEndpoint ();
s << endpoint.address ().to_string () << ":" << endpoint.port () << "<BR>";
if (outgoing) s << "-->";
s << endpoint.address ().to_string () << ":" << endpoint.port ();
if (!outgoing) s << "-->";
s << "<BR>";
}
}
s << "<p><a href=\"zmw2cyw2vj7f6obx3msmdvdepdhnw2ctc4okza2zjxlukkdfckhq\">Flibusta</a></p>";

1
SSU.h

@ -74,6 +74,7 @@ namespace ssu @@ -74,6 +74,7 @@ namespace ssu
void ConnectThroughIntroducer (const i2p::data::RouterInfo::Introducer& introducer);
void Close ();
boost::asio::ip::udp::endpoint& GetRemoteEndpoint () { return m_RemoteEndpoint; };
const i2p::data::RouterInfo * GetRemoteRouter () const { return m_RemoteRouter; };
void SendI2NPMessage (I2NPMessage * msg);
private:

Loading…
Cancel
Save