Browse Source

don't run peer test for SSU2 through proxy

pull/1797/head
orignal 2 years ago
parent
commit
016222463d
  1. 1
      libi2pd/SSU2.h
  2. 4
      libi2pd/Transports.cpp

1
libi2pd/SSU2.h

@ -58,6 +58,7 @@ namespace transport @@ -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; };

4
libi2pd/Transports.cpp

@ -665,7 +665,7 @@ namespace transport @@ -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 @@ -714,7 +714,7 @@ namespace transport
}
// SSU2
if (m_SSU2Server)
if (m_SSU2Server && !m_SSU2Server->UsesProxy ())
{
excluded.clear ();
excluded.insert (i2p::context.GetIdentHash ());

Loading…
Cancel
Save