diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 574634cc..a325ad4b 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -791,6 +791,8 @@ namespace http { << it.second->GetRemoteEndpoint ().address ().to_string (); if (!it.second->IsOutgoing ()) tmp_s << " ⇒ "; tmp_s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]"; + if (it.second->GetRelayTag ()) + tmp_s << " [itag:" << it.second->GetRelayTag () << "]"; tmp_s << "\r\n" << std::endl; cnt++; } @@ -802,6 +804,8 @@ namespace http { << "[" << it.second->GetRemoteEndpoint ().address ().to_string () << "]"; if (!it.second->IsOutgoing ()) tmp_s6 << " ⇒ "; tmp_s6 << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]"; + if (it.second->GetRelayTag ()) + tmp_s6 << " [itag:" << it.second->GetRelayTag () << "]"; tmp_s6 << "\r\n" << std::endl; cnt6++; } diff --git a/libi2pd/SSU2Session.h b/libi2pd/SSU2Session.h index 8a1ce0f0..73e0f875 100644 --- a/libi2pd/SSU2Session.h +++ b/libi2pd/SSU2Session.h @@ -176,6 +176,7 @@ namespace transport void Done () override; void SendLocalRouterInfo (bool update) override; void SendI2NPMessages (const std::vector >& msgs) override; + uint32_t GetRelayTag () const override { return m_RelayTag; }; void Resend (uint64_t ts); bool IsEstablished () const { return m_State == eSSU2SessionStateEstablished; }; uint64_t GetConnID () const { return m_SourceConnID; }; diff --git a/libi2pd/TransportSession.h b/libi2pd/TransportSession.h index 8370c1d5..0b5628d4 100644 --- a/libi2pd/TransportSession.h +++ b/libi2pd/TransportSession.h @@ -96,6 +96,7 @@ namespace transport bool IsTerminationTimeoutExpired (uint64_t ts) const { return ts >= m_LastActivityTimestamp + GetTerminationTimeout (); }; + virtual uint32_t GetRelayTag () const { return 0; }; virtual void SendLocalRouterInfo (bool update = false) { SendI2NPMessages ({ CreateDatabaseStoreMsg () }); }; virtual void SendI2NPMessages (const std::vector >& msgs) = 0;