From 27c7ea28012692b3eedba6785508a23637be1ed5 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 12 Mar 2014 07:37:43 -0400 Subject: [PATCH] print direction of SSU session --- HTTPServer.cpp | 7 ++++++- SSU.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index a27992ba..d71deb3c 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -164,8 +164,13 @@ namespace util s << "
SSU
"; 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 () << "
"; + if (outgoing) s << "-->"; + s << endpoint.address ().to_string () << ":" << endpoint.port (); + if (!outgoing) s << "-->"; + s << "
"; } } s << "

Flibusta

"; diff --git a/SSU.h b/SSU.h index 0976fc80..c61d09bb 100644 --- a/SSU.h +++ b/SSU.h @@ -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: