From 016222463d5189ce9efbb4191723eface67987e5 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 26 Oct 2022 21:14:28 -0400 Subject: [PATCH] don't run peer test for SSU2 through proxy --- libi2pd/SSU2.h | 1 + libi2pd/Transports.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libi2pd/SSU2.h b/libi2pd/SSU2.h index 767a9eb8..fb2925cb 100644 --- a/libi2pd/SSU2.h +++ b/libi2pd/SSU2.h @@ -58,6 +58,7 @@ namespace transport boost::asio::io_service& GetService () { return GetIOService (); }; void SetLocalAddress (const boost::asio::ip::address& localAddress); bool SetProxy (const std::string& address, uint16_t port); + bool UsesProxy () const { return m_IsThroughProxy; }; bool IsSupported (const boost::asio::ip::address& addr) const; uint16_t GetPort (bool v4) const; bool IsSyncClockFromPeers () const { return m_IsSyncClockFromPeers; }; diff --git a/libi2pd/Transports.cpp b/libi2pd/Transports.cpp index 04ded36f..676cd876 100644 --- a/libi2pd/Transports.cpp +++ b/libi2pd/Transports.cpp @@ -665,7 +665,7 @@ namespace transport LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv4"); } // SSU2 - if (m_SSU2Server) + if (m_SSU2Server && !m_SSU2Server->UsesProxy ()) { excluded.clear (); excluded.insert (i2p::context.GetIdentHash ()); @@ -714,7 +714,7 @@ namespace transport } // SSU2 - if (m_SSU2Server) + if (m_SSU2Server && !m_SSU2Server->UsesProxy ()) { excluded.clear (); excluded.insert (i2p::context.GetIdentHash ());