From 744b25190ad7e47d77ba15f5a2c1d80c63a3ab3a Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 10 Mar 2021 15:36:10 -0500 Subject: [PATCH] don't set proxy if ntcp2 is disabled --- daemon/Daemon.cpp | 2 +- libi2pd/Transports.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/Daemon.cpp b/daemon/Daemon.cpp index 212d90c4..cfcf1025 100644 --- a/daemon/Daemon.cpp +++ b/daemon/Daemon.cpp @@ -367,7 +367,7 @@ namespace util if(!ntcp2) LogPrint(eLogInfo, "Daemon: ntcp2 disabled"); i2p::transport::transports.SetCheckReserved(checkInReserved); - i2p::transport::transports.Start(ntcp2 || i2p::context.SupportsMesh (), ssu); + i2p::transport::transports.Start(ntcp2, ssu); if (i2p::transport::transports.IsBoundSSU() || i2p::transport::transports.IsBoundNTCP2()) LogPrint(eLogInfo, "Daemon: Transports started"); else diff --git a/libi2pd/Transports.cpp b/libi2pd/Transports.cpp index 36bf1ac5..b6ed57b9 100644 --- a/libi2pd/Transports.cpp +++ b/libi2pd/Transports.cpp @@ -174,9 +174,9 @@ namespace transport std::string ntcp2proxy; i2p::config::GetOption("ntcp2.proxy", ntcp2proxy); i2p::http::URL proxyurl; // create NTCP2. TODO: move to acceptor - if (enableNTCP2) + if (enableNTCP2 || i2p::context.SupportsMesh ()) { - if(!ntcp2proxy.empty()) + if(!ntcp2proxy.empty() && enableNTCP2) { if(proxyurl.parse(ntcp2proxy)) {