Skip to content

Commit 3c77714

Browse files
committed
Make -proxy set all network types, avoiding a connect leak.
Previously -proxy was not setting the proxy for IsLimited networks, so if you set your configuration to be onlynet=tor you wouldn't get an IPv4 proxy set. The payment protocol gets its proxy configuration from the IPv4 proxy, and so it would experience a connection leak. This addresses issue #5355 and also clears up a cosmetic bug where getinfo proxy output shows nothing when onlynet=tor is set.
1 parent cbf28c6 commit 3c77714

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/init.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,10 +854,8 @@ bool AppInit2(boost::thread_group& threadGroup)
854854
if (!addrProxy.IsValid())
855855
return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
856856

857-
if (!IsLimited(NET_IPV4))
858-
SetProxy(NET_IPV4, addrProxy);
859-
if (!IsLimited(NET_IPV6))
860-
SetProxy(NET_IPV6, addrProxy);
857+
SetProxy(NET_IPV4, addrProxy);
858+
SetProxy(NET_IPV6, addrProxy);
861859
SetNameProxy(addrProxy);
862860
fProxy = true;
863861
}

0 commit comments

Comments
 (0)