Browse Source

Update tor.md for Zcash

pull/145/head
bitcartel 8 years ago
committed by GitHub
parent
commit
85cc6f5b44
  1. 64
      doc/tor.md

64
doc/tor.md

@ -1,20 +1,18 @@
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
*** Warning: Do not assume Tor support does the correct thing in Zcash; better Tor support is a future feature goal. ***
TOR SUPPORT IN BITCOIN
======================
TOR SUPPORT IN ZCASH
====================
It is possible to run Bitcoin as a Tor hidden service, and connect to such services.
It is possible to run Zcash as a Tor hidden service, and connect to such services.
The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on a random port. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
configure Tor.
1. Run bitcoin behind a Tor proxy
---------------------------------
1. Run Zcash behind a Tor proxy
-------------------------------
The first step is running Bitcoin behind a Tor proxy. This will already make all
The first step is running Zcash behind a Tor proxy. This will already make all
outgoing connections be anonymized, but more is possible.
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
@ -35,27 +33,27 @@ outgoing connections be anonymized, but more is possible.
In a typical situation, this suffices to run behind a Tor proxy:
./bitcoin -proxy=127.0.0.1:9050
./zcashd -proxy=127.0.0.1:9050
2. Run a bitcoin hidden server
------------------------------
2. Run a Zcash hidden server
----------------------------
If you configure your Tor system accordingly, it is possible to make your node also
reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent
config file):
HiddenServiceDir /var/lib/tor/bitcoin-service/
HiddenServiceDir /var/lib/tor/zcash-service/
HiddenServicePort 8233 127.0.0.1:8233
HiddenServicePort 18233 127.0.0.1:18233
The directory can be different of course, but (both) port numbers should be equal to
your bitcoind's P2P listen port (8233 by default).
your zcashd's P2P listen port (8233 by default).
-externalip=X You can tell bitcoin about its publicly reachable address using
-externalip=X You can tell Zcash about its publicly reachable address using
this option, and this can be a .onion address. Given the above
configuration, you can find your onion address in
/var/lib/tor/bitcoin-service/hostname. Onion addresses are given
/var/lib/tor/zcash-service/hostname. Onion addresses are given
preference for your node to advertize itself with, for connections
coming from unroutable addresses (such as 127.0.0.1, where the
Tor proxy typically runs).
@ -72,17 +70,47 @@ your bitcoind's P2P listen port (8233 by default).
In a typical situation, where you're only reachable via Tor, this should suffice:
./bitcoind -proxy=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -listen
./zcashd -proxy=127.0.0.1:9050 -externalip=abc123.onion -listen
(obviously, replace the Onion address with your own). If you don't care too much
about hiding your node, and want to be reachable on IPv4 as well, additionally
specify:
./bitcoind ... -discover
./zcashd ... -discover
and open port 8233 on your firewall (or use -upnp).
If you only want to use Tor to reach onion addresses, but not use it as a proxy
for normal IPv4/IPv6 communication, use:
./bitcoin -onion=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -discover
./zcashd -onion=127.0.0.1:9050 -externalip=abc123.onion -discover
3. Connect to a Zcash hidden server
-----------------------------------
To test your set-up, you might want to try connecting via Tor to just a
a single Zcash hidden server.
Edit zcash.conf and comment out any nodes you might normally connect to.
#addnode=alphatestnet.z.cash
Launch zcashd as follows:
zcashd -onion=127.0.0.1:9050 -addnode=abc123.onion
Now use zcash-cli to verify there is only a single peer connection.
zcash-cli getpeerinfo
[
{
"id" : 1,
"addr" : "abc123.onion:18233",
...
"version" : 70002,
"subver" : "/Satoshi:0.11.2/",
...
}
]

Loading…
Cancel
Save