commit 20f6da73b82806ac5572c9385a7bd91f5d2a3a40 parent a08407b0de5f0759211e4a498fe68c3bb2aeaf7e Author: nickfarrow <nicholas.w.farrow@gmail.com> Date: Wed, 11 Aug 2021 06:27:00 +1000 add tor documentation for both use cases Diffstat:
A | docs/tor.md | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 42 insertions(+), 0 deletions(-)
diff --git a/docs/tor.md b/docs/tor.md @@ -0,0 +1,42 @@ +# SatSale over tor +Currently you can use Tor in two ways +1) Connect SatSale to your Bitcoin node over a tor hidden service +2) Host SatSale as a Tor onion + +# Bitcoin Node RPC Hidden Service +On your Bitcoin node machine install tor and in `/etc/tor/torrc`: +``` +HiddenServiceDir /var/lib/tor/node_rpc/ +HiddenServicePort 8332 127.0.0.1:8332 +``` +then +``` +sudo systemctl restart tor +cat /var/lib/tor/node_rpc/hostname +``` +to get the onion URL for your tor hidden service. Add this in `config.py` like `tor_bitcoinrpc_host = "http://u7...bid.onion"` + +On your SatSale machine, install tor and in `/etc/tor/torrc` (thanks @x_y:matrix.org): +``` +SocksPort 127.0.0.1:9050 IsolateClientProtocol IsolateDestPort IsolateDestAddr ExtendedErrors IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth +SocksPolicy accept 127.0.0.1 +SocksPolicy reject * +``` +Now start the tor proxy on your SatSale machine with `sudo tor` and SatSale is now configured to connect to your node over tor. + + +# SatSale Tor .Onion +On your SatSale machine, install tor and in `/etc/tor/torrc`: +``` +HiddenServiceDir /var/lib/tor/satsale/ +HiddenServiceVersion 3 +HiddenServicePort 80 127.0.0.1:8000 +``` +then +``` +sudo systemctl restart tor +cat /var/lib/tor/satsale/hostname +``` +to get your onion URL. Go visit! + +Note that this will only work in some Tor browsers, and often not in the official Tor Browser unless you fully enable javascript etc.