mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
add options to not use ntcp or ssu
This commit is contained in:
parent
fa68e392c8
commit
e868d427dd
6 changed files with 22 additions and 13 deletions
|
@ -105,7 +105,7 @@ namespace transport
|
|||
Stop ();
|
||||
}
|
||||
|
||||
void Transports::Start ()
|
||||
void Transports::Start (bool enableNTCP, bool enableSSU)
|
||||
{
|
||||
m_DHKeysPairSupplier.Start ();
|
||||
m_IsRunning = true;
|
||||
|
@ -114,7 +114,7 @@ namespace transport
|
|||
auto& addresses = context.GetRouterInfo ().GetAddresses ();
|
||||
for (auto address : addresses)
|
||||
{
|
||||
if (!m_NTCPServer)
|
||||
if (!m_NTCPServer && enableNTCP)
|
||||
{
|
||||
m_NTCPServer = new NTCPServer ();
|
||||
m_NTCPServer->Start ();
|
||||
|
@ -129,7 +129,7 @@ namespace transport
|
|||
|
||||
if (address->transportStyle == RouterInfo::eTransportSSU && address->host.is_v4 ())
|
||||
{
|
||||
if (!m_SSUServer)
|
||||
if (!m_SSUServer && enableSSU)
|
||||
{
|
||||
m_SSUServer = new SSUServer (address->port);
|
||||
LogPrint (eLogInfo, "Transports: Start listening UDP port ", address->port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue