bitcoin/bitcoin — pull request #1174 by sipa (2012-05-01 15:47:32+00:00)
Title: Tor hidden service support

(extends #1141 (proxy improvements) and #1021 (ipv6 support)

Adds support for running as and connecting to Tor hidden services. *.onion addresses are mapped into the IPv6 range in the same way as OnionCat does.

To run a hidden service:
* -proxy=127.0.0.1:9050 (connect to Tor proxy)
* -socks=5 (use socks5, default)
* -proxydns (pass name queries directly to proxy, default if using Tor)
* -externalip=234abcdefghijklmnopq567.onion (tell bitcoind your onion address)
* -nodiscover (do not detect other external IP address, to prevent the node from telling others your real IP)

Furthermore, make sure the port bitcoind listens on is not reachable from the outside world, and configure a hidden service for Tor on port 8333, forwarded to 127.0.0.1:8333.