doc: update tor.md to mention the new -proxy=addr:port=tor

Also change the formatting of `tor.md` to have more horizonal space for
the text.

Co-authored-by: Matthew Zipkin <pinheadmz@gmail.com>
This commit is contained in:
Vasil Dimov
2025-05-07 12:38:37 +02:00
parent ca5781e23a
commit e98c51fcce

View File

@ -32,33 +32,53 @@ You can use the `getnodeaddresses` RPC to fetch a number of onion peers known to
The first step is running Bitcoin Core behind a Tor proxy. This will already anonymize all The first step is running Bitcoin Core behind a Tor proxy. This will already anonymize all
outgoing connections, but more is possible. outgoing connections, but more is possible.
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy -proxy=ip[:port]
server will be used to try to reach .onion addresses as well. Set the proxy server. It will be used to try to reach .onion addresses
You need to use -noonion or -onion=0 to explicitly disable as well. You need to use -noonion or -onion=0 to explicitly disable
outbound access to onion services. outbound access to onion services.
-onion=ip:port Set the proxy server to use for Tor onion services. You do not -proxy=ip[:port]=tor
need to set this if it's the same as -proxy. You can use -onion=0 or
to explicitly disable access to onion services. -onion=ip[:port]
------------------------------------------------------------------ Set the proxy server for reaching .onion addresses. You do not need to
Note: Only the -proxy option sets the proxy for DNS requests; set this if it's the same as the generic -proxy. You can use -onion=0 to
with -onion they will not route over Tor, so use -proxy if you explicitly disable access to onion services.
have privacy concerns. ------------------------------------------------------------------------
------------------------------------------------------------------ Note: The proxy for DNS requests is taken from
-proxy=addr:port or
-proxy=addr:port=ipv4 or
-proxy=addr:port=ipv6
(last one if multiple options are given). It is not taken from
-proxy=addr:port=tor or
-onion=addr:port.
If no proxy for DNS requests is configured, then they will be done using
the functions provided by the operating system, most likely resulting in
them being done over the clearnet to the DNS servers of the internet
service provider.
------------------------------------------------------------------------
-listen When using -proxy, listening is disabled by default. If you want If -proxy or -onion is specified multiple times, later occurences override
to manually configure an onion service (see section 3), you'll earlier ones and command line overrides the config file. UNIX domain sockets may
need to enable it explicitly. be used for proxy connections. Set `-onion` or `-proxy` to the local socket path
with the prefix `unix:` (e.g. `-onion=unix:/home/me/torsocket`).
-connect=X When behind a Tor proxy, you can specify .onion addresses instead -listen
-addnode=X of IP addresses or hostnames in these parameters. It requires When using -proxy, listening is disabled by default. If you want to
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with manually configure an onion service (see section 3), you'll need to
other P2P nodes. enable it explicitly.
-onlynet=onion Make automatic outbound connections only to .onion addresses. -connect=X
Inbound and manual connections are not affected by this option. -addnode=X
It can be specified multiple times to allow multiple networks, -seednode=X
e.g. onlynet=onion, onlynet=i2p, onlynet=cjdns. When behind a Tor proxy, you can specify .onion addresses instead of IP
addresses or hostnames in these parameters. Such addresses can also be
exchanged with other P2P nodes.
-onlynet=onion
Make automatic outbound connections only to .onion addresses. Inbound
and manual connections are not affected by this option. It can be
specified multiple times to allow multiple networks, e.g. onlynet=onion,
onlynet=i2p, onlynet=cjdns.
In a typical situation, this suffices to run behind a Tor proxy: In a typical situation, this suffices to run behind a Tor proxy: