2022-03-23 22:00:35 +00:00
|
|
|
## Tor
|
|
|
|
|
|
|
|
Basicswap can be configured to route all traffic through a tor proxy.
|
|
|
|
|
2022-03-27 11:05:53 +00:00
|
|
|
Note that TOR integration is experimental and should not yet be relied upon.
|
|
|
|
|
|
|
|
|
2022-03-23 22:00:35 +00:00
|
|
|
|
|
|
|
### basicswap-prepare
|
|
|
|
|
|
|
|
basicswap-prepare can be configured to download all binaries through tor and to enable or disable tor in all active coin config files.
|
|
|
|
|
|
|
|
|
2022-03-27 09:28:17 +00:00
|
|
|
#### Create initial files
|
|
|
|
|
|
|
|
Docker will create directories instead of files if these don't exist.
|
|
|
|
|
|
|
|
touch $COINDATA_PATH/tor/torrc
|
|
|
|
|
|
|
|
|
2022-03-23 22:00:35 +00:00
|
|
|
#### For a new install
|
|
|
|
|
|
|
|
Note that some download links, notably for Litecoin, are unreachable when using tor.
|
|
|
|
|
|
|
|
If running through docker start the tor container with the following command as the torrc configuration file won't exist yet.
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml run --name tor --rm tor \
|
2022-03-27 11:05:53 +00:00
|
|
|
tor --allow-missing-torrc --SocksPort 0.0.0.0:9050
|
2022-03-23 22:00:35 +00:00
|
|
|
|
2022-03-27 09:28:17 +00:00
|
|
|
docker compose -f docker-compose_with_tor.yml run -e TOR_PROXY_HOST=172.16.238.200 --rm swapclient \
|
2022-03-23 22:00:35 +00:00
|
|
|
basicswap-prepare --usetorproxy --datadir=/coindata --withcoins=monero,particl
|
|
|
|
|
|
|
|
|
|
|
|
Start Basicswap with:
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml up
|
|
|
|
|
|
|
|
#### Enable tor on an existing datadir
|
|
|
|
|
2022-03-27 09:28:17 +00:00
|
|
|
docker compose -f docker-compose_with_tor.yml run -e TOR_PROXY_HOST=172.16.238.200 --rm swapclient \
|
2022-03-23 22:00:35 +00:00
|
|
|
basicswap-prepare --datadir=/coindata --enabletor
|
|
|
|
|
|
|
|
#### Disable tor on an existing datadir
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
|
|
|
basicswap-prepare --datadir=/coindata --disabletor
|
2022-03-27 11:05:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Update coin release
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml up -d tor
|
|
|
|
docker compose -f docker-compose_with_tor.yml run -e TOR_PROXY_HOST=172.16.238.200 --rm swapclient \
|
|
|
|
basicswap-prepare --usetorproxy --datadir=/coindata --preparebinonly --withcoins=bitcoin
|
|
|
|
docker compose -f docker-compose_with_tor.yml stop
|