enable SSU2 server

This commit is contained in:
orignal 2022-03-13 21:34:11 -04:00
parent 6d7d71bb16
commit 21c1ec9c8c
5 changed files with 31 additions and 11 deletions

View file

@ -157,7 +157,7 @@ namespace transport
}
}
void Transports::Start (bool enableNTCP2, bool enableSSU)
void Transports::Start (bool enableNTCP2, bool enableSSU, bool enableSSU2)
{
if (!m_Service)
{
@ -217,7 +217,9 @@ namespace transport
}
}
}
// create SSU2 server
if (enableSSU2) m_SSU2Server = new SSU2Server ();
// bind to interfaces
bool ipv4; i2p::config::GetOption("ipv4", ipv4);
if (ipv4)
@ -282,7 +284,8 @@ namespace transport
}
if (m_SSUServer) DetectExternalIP ();
}
if (m_SSU2Server) m_SSU2Server->Start ();
m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(5*SESSION_CREATION_TIMEOUT));
m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));