show SSU sessions
This commit is contained in:
@@ -144,6 +144,7 @@ namespace util
|
|||||||
}
|
}
|
||||||
|
|
||||||
s << "<P>Transports</P>";
|
s << "<P>Transports</P>";
|
||||||
|
s << "NTCP<BR>";
|
||||||
for (auto it: i2p::transports.GetNTCPSessions ())
|
for (auto it: i2p::transports.GetNTCPSessions ())
|
||||||
{
|
{
|
||||||
// RouterInfo of incoming connection doesn't have address
|
// RouterInfo of incoming connection doesn't have address
|
||||||
@@ -157,6 +158,16 @@ namespace util
|
|||||||
s << "<BR>";
|
s << "<BR>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
auto ssuServer = i2p::transports.GetSSUServer ();
|
||||||
|
if (ssuServer)
|
||||||
|
{
|
||||||
|
s << "<BR>SSU<BR>";
|
||||||
|
for (auto it: ssuServer->GetSessions ())
|
||||||
|
{
|
||||||
|
auto endpoint = it.second->GetRemoteEndpoint ();
|
||||||
|
s << endpoint.address ().to_string () << ":" << endpoint.port () << "<BR>";
|
||||||
|
}
|
||||||
|
}
|
||||||
s << "<p><a href=\"zmw2cyw2vj7f6obx3msmdvdepdhnw2ctc4okza2zjxlukkdfckhq\">Flibusta</a></p>";
|
s << "<p><a href=\"zmw2cyw2vj7f6obx3msmdvdepdhnw2ctc4okza2zjxlukkdfckhq\">Flibusta</a></p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
SSU.h
6
SSU.h
@@ -74,7 +74,7 @@ namespace ssu
|
|||||||
void Close ();
|
void Close ();
|
||||||
boost::asio::ip::udp::endpoint& GetRemoteEndpoint () { return m_RemoteEndpoint; };
|
boost::asio::ip::udp::endpoint& GetRemoteEndpoint () { return m_RemoteEndpoint; };
|
||||||
void SendI2NPMessage (I2NPMessage * msg);
|
void SendI2NPMessage (I2NPMessage * msg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void CreateAESandMacKey (uint8_t * pubKey, uint8_t * aesKey, uint8_t * macKey);
|
void CreateAESandMacKey (uint8_t * pubKey, uint8_t * aesKey, uint8_t * macKey);
|
||||||
@@ -141,6 +141,10 @@ namespace ssu
|
|||||||
boost::asio::ip::udp::endpoint m_SenderEndpoint;
|
boost::asio::ip::udp::endpoint m_SenderEndpoint;
|
||||||
uint8_t m_ReceiveBuffer[2*SSU_MTU];
|
uint8_t m_ReceiveBuffer[2*SSU_MTU];
|
||||||
std::map<boost::asio::ip::udp::endpoint, SSUSession *> m_Sessions;
|
std::map<boost::asio::ip::udp::endpoint, SSUSession *> m_Sessions;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// for HTTP only
|
||||||
|
const decltype(m_Sessions)& GetSessions () const { return m_Sessions; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,6 +58,7 @@ namespace i2p
|
|||||||
|
|
||||||
// for HTTP only
|
// for HTTP only
|
||||||
const decltype(m_NTCPSessions)& GetNTCPSessions () const { return m_NTCPSessions; };
|
const decltype(m_NTCPSessions)& GetNTCPSessions () const { return m_NTCPSessions; };
|
||||||
|
const i2p::ssu::SSUServer * GetSSUServer () const { return m_SSUServer; };
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Transports transports;
|
extern Transports transports;
|
||||||
|
Reference in New Issue
Block a user