mirror of
https://github.com/basicswap/basicswap.git
synced 2024-12-22 11:39:34 +00:00
doc: Simplify tor install notes.
This commit is contained in:
parent
3e14a784f3
commit
fab89a42f3
4 changed files with 24 additions and 12 deletions
|
@ -1011,7 +1011,7 @@ def modify_tor_config(settings, coin, tor_control_password=None, enable=False):
|
||||||
if enable:
|
if enable:
|
||||||
if not coin_settings['manage_daemon']:
|
if not coin_settings['manage_daemon']:
|
||||||
fp.write(f'proxy={TOR_PROXY_HOST}:{TOR_PROXY_PORT}\n')
|
fp.write(f'proxy={TOR_PROXY_HOST}:{TOR_PROXY_PORT}\n')
|
||||||
fp.write(f'daemon-ssl-allow-any-cert=1\n')
|
fp.write('daemon-ssl-allow-any-cert=1\n')
|
||||||
return
|
return
|
||||||
|
|
||||||
config_path = os.path.join(data_dir, coin + '.conf')
|
config_path = os.path.join(data_dir, coin + '.conf')
|
||||||
|
|
31
doc/tor.md
31
doc/tor.md
|
@ -16,40 +16,49 @@ basicswap-prepare can be configured to download all binaries through tor and to
|
||||||
Docker will create directories instead of files if these don't exist.
|
Docker will create directories instead of files if these don't exist.
|
||||||
|
|
||||||
mkdir -p $COINDATA_PATH/tor
|
mkdir -p $COINDATA_PATH/tor
|
||||||
touch $COINDATA_PATH/tor/torrc
|
echo 'SocksPort 0.0.0.0:9050' > $COINDATA_PATH/tor/torrc
|
||||||
|
|
||||||
|
|
||||||
#### For a new install
|
#### For a new install
|
||||||
|
|
||||||
|
Use the `--usetorproxy` argument to download the coin binaries over tor, then enable tor with `--enabletor`.
|
||||||
Note that some download links, notably for Litecoin, are unreachable when using tor.
|
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 --rm swapclient \
|
||||||
|
basicswap-prepare --usetorproxy --datadir=/coindata --withcoins=monero,particl
|
||||||
|
|
||||||
docker compose -f docker-compose_with_tor.yml run --name tor --rm tor \
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
||||||
tor --allow-missing-torrc --SocksPort 0.0.0.0:9050
|
basicswap-prepare --enabletor --datadir=/coindata
|
||||||
|
|
||||||
docker compose -f docker-compose_with_tor.yml run -e TOR_PROXY_HOST=172.16.238.200 --rm swapclient \
|
|
||||||
basicswap-prepare --usetorproxy --datadir=/coindata --withcoins=monero,particl
|
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
|
||||||
|
|
||||||
|
|
||||||
Start Basicswap with:
|
Start Basicswap with:
|
||||||
|
|
||||||
docker compose -f docker-compose_with_tor.yml up
|
docker compose -f docker-compose_with_tor.yml up
|
||||||
|
|
||||||
|
|
||||||
#### Enable tor on an existing datadir
|
#### Enable tor on an existing datadir
|
||||||
|
|
||||||
docker compose -f docker-compose_with_tor.yml run -e TOR_PROXY_HOST=172.16.238.200 --rm swapclient \
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
||||||
basicswap-prepare --datadir=/coindata --enabletor
|
basicswap-prepare --datadir=/coindata --enabletor
|
||||||
|
|
||||||
|
docker compose -f docker-compose_with_tor.yml stop
|
||||||
|
|
||||||
#### Disable tor on an existing datadir
|
#### Disable tor on an existing datadir
|
||||||
|
|
||||||
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
||||||
basicswap-prepare --datadir=/coindata --disabletor
|
basicswap-prepare --datadir=/coindata --disabletor
|
||||||
|
|
||||||
|
docker compose -f docker-compose_with_tor.yml stop
|
||||||
|
|
||||||
|
|
||||||
#### Update coin release
|
#### Update coin release
|
||||||
|
|
||||||
docker compose -f docker-compose_with_tor.yml up -d tor
|
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 \
|
docker compose -f docker-compose_with_tor.yml run --rm swapclient \
|
||||||
basicswap-prepare --usetorproxy --datadir=/coindata --preparebinonly --withcoins=bitcoin
|
basicswap-prepare --usetorproxy --datadir=/coindata --preparebinonly --withcoins=bitcoin
|
||||||
docker compose -f docker-compose_with_tor.yml stop
|
docker compose -f docker-compose_with_tor.yml stop
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
HTML_PORT=127.0.0.1:12700:12700
|
HTML_PORT=127.0.0.1:12700:12700
|
||||||
WS_PORT=127.0.0.1:11700:11700
|
WS_PORT=127.0.0.1:11700:11700
|
||||||
#COINDATA_PATH=/var/data/coinswaps
|
#COINDATA_PATH=/var/data/coinswaps
|
||||||
|
TOR_PROXY_HOST=172.16.238.200
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
|
|
|
@ -5,6 +5,8 @@ services:
|
||||||
image: i_swapclient
|
image: i_swapclient
|
||||||
container_name: swapclient
|
container_name: swapclient
|
||||||
stop_grace_period: 5m
|
stop_grace_period: 5m
|
||||||
|
depends_on:
|
||||||
|
- tor
|
||||||
build:
|
build:
|
||||||
context: ../
|
context: ../
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in a new issue