config: allow setting -proxy per network

`-proxy=addr:port` specifies the proxy for all networks (except I2P).
Previously only the Tor proxy could have been specified separately via
`-onion=addr:port`.

Make it possible to specify separately the proxy for IPv4, IPv6, Tor and
CJDNS by e.g. `-proxy=addr:port=ipv6`. Or remove the proxy for a given
network, e.g. `-proxy=0=cjdns`.

Resolves: https://github.com/bitcoin/bitcoin/issues/24450
This commit is contained in:
Vasil Dimov
2025-05-06 14:12:55 +02:00
parent baa848b8d3
commit ca5781e23a
4 changed files with 136 additions and 44 deletions

View File

@@ -71,7 +71,6 @@ static const float RECONNECT_TIMEOUT_MAX = 600.0;
* this is belt-and-suspenders sanity limit to prevent memory exhaustion.
*/
static const int MAX_LINE_LENGTH = 100000;
static const uint16_t DEFAULT_TOR_SOCKS_PORT = 9050;
/****** Low-level TorControlConnection ********/