mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 08:52:45 +00:00
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. Conflicts: src/init.cpp Rebased-From: 3c777141349ad82d679a278df0619968af53c23 Github-Issue: #5358
This commit is contained in:
parent
25b49b5b45
commit
cd5164aba2
@ -728,11 +728,9 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
if (!addrProxy.IsValid())
|
if (!addrProxy.IsValid())
|
||||||
return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
|
return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
|
||||||
|
|
||||||
if (!IsLimited(NET_IPV4))
|
SetProxy(NET_IPV4, addrProxy, nSocksVersion);
|
||||||
SetProxy(NET_IPV4, addrProxy, nSocksVersion);
|
|
||||||
if (nSocksVersion > 4) {
|
if (nSocksVersion > 4) {
|
||||||
if (!IsLimited(NET_IPV6))
|
SetProxy(NET_IPV6, addrProxy, nSocksVersion);
|
||||||
SetProxy(NET_IPV6, addrProxy, nSocksVersion);
|
|
||||||
SetNameProxy(addrProxy, nSocksVersion);
|
SetNameProxy(addrProxy, nSocksVersion);
|
||||||
}
|
}
|
||||||
fProxy = true;
|
fProxy = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user