mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
firewall detection
This commit is contained in:
parent
51aea367c3
commit
30715c2512
5 changed files with 28 additions and 2 deletions
|
@ -902,10 +902,15 @@ namespace transport
|
|||
case ePeerTestParticipantAlice1:
|
||||
{
|
||||
if (m_State == eSessionStateEstablished)
|
||||
{
|
||||
LogPrint (eLogDebug, "SSU peer test from Bob. We are Alice");
|
||||
if (i2p::context.GetStatus () == eRouterStatusTesting) // still not OK
|
||||
i2p::context.SetStatus (eRouterStatusFirewalled);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogDebug, "SSU first peer test from Charlie. We are Alice");
|
||||
i2p::context.SetStatus (eRouterStatusOK);
|
||||
m_Server.UpdatePeerTest (nonce, ePeerTestParticipantAlice2);
|
||||
SendPeerTest (nonce, senderEndpoint.address ().to_v4 ().to_ulong (),
|
||||
senderEndpoint.port (), introKey, true, false); // to Charlie
|
||||
|
@ -920,6 +925,7 @@ namespace transport
|
|||
{
|
||||
// peer test successive
|
||||
LogPrint (eLogDebug, "SSU second peer test from Charlie. We are Alice");
|
||||
i2p::context.SetStatus (eRouterStatusOK);
|
||||
m_Server.RemovePeerTest (nonce);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue