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.
|
|
|
|
|
2022-11-16 22:36:13 +00:00
|
|
|
mkdir -p $COINDATA_PATH/tor
|
2024-02-04 08:25:16 +00:00
|
|
|
echo 'SocksPort 0.0.0.0:9050' > $COINDATA_PATH/tor/torrc
|
2022-03-27 09:28:17 +00:00
|
|
|
|
|
|
|
|
2022-03-23 22:00:35 +00:00
|
|
|
#### For a new install
|
|
|
|
|
2024-02-04 08:25:16 +00:00
|
|
|
Use the `--usetorproxy` argument to download the coin binaries over tor, then enable tor with `--enabletor`.
|
2022-03-23 22:00:35 +00:00
|
|
|
Note that some download links, notably for Litecoin, are unreachable when using tor.
|
|
|
|
|
2024-02-04 08:25:16 +00:00
|
|
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
|
|
|
basicswap-prepare --usetorproxy --datadir=/coindata --withcoins=monero,particl
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
|
|
|
basicswap-prepare --enabletor --datadir=/coindata
|
2022-03-23 22:00:35 +00:00
|
|
|
|
|
|
|
|
2024-02-04 08:25:16 +00:00
|
|
|
The `--enabletor` option will add config to the torrc file, the tor container must afterwards be stopped to load the new config:
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml stop
|
2022-03-23 22:00:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
Start Basicswap with:
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml up
|
|
|
|
|
2024-02-04 08:25:16 +00:00
|
|
|
|
2022-03-23 22:00:35 +00:00
|
|
|
#### Enable tor on an existing datadir
|
|
|
|
|
2024-02-04 08:25:16 +00:00
|
|
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
|
|
|
basicswap-prepare --datadir=/coindata --enabletor
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml stop
|
2022-03-23 22:00:35 +00:00
|
|
|
|
|
|
|
#### Disable tor on an existing datadir
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
2024-02-04 08:25:16 +00:00
|
|
|
basicswap-prepare --datadir=/coindata --disabletor
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml stop
|
2022-03-27 11:05:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Update coin release
|
|
|
|
|
|
|
|
docker compose -f docker-compose_with_tor.yml up -d tor
|
2024-02-04 08:25:16 +00:00
|
|
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
|
|
|
basicswap-prepare --usetorproxy --datadir=/coindata --preparebinonly --withcoins=bitcoin
|
2022-03-27 11:05:53 +00:00
|
|
|
docker compose -f docker-compose_with_tor.yml stop
|