run a tor relay in a container 中文
middle:
docker run -d \
--restart always \
-v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \
--name tor-relay \
chenjia404/tor-relay -f /etc/tor/torrc.middle
Bridge relay:
docker run -d \
--restart always \
-v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \
--name tor-relay \
chenjia404/tor-relay -f /etc/tor/torrc.bridge
Exit relay:
docker run -d \
--restart always \
-v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \
--name tor-relay \
chenjia404/tor-relay -f /etc/tor/torrc.exit
Save the key and data of the relay node:
mkdir -p /home/tor-data
chown -R 100:100 /home/tor-data
docker run -d \
--restart always \
-v /home/tor-data:/var/lib/tor/.tor
-v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \
--name tor-relay \
chenjia404/tor-relay -f /etc/tor/torrc.middle
tor-0.4.7.10
Name | Description | Default value |
---|---|---|
RELAY_TYPE | The type of relay (bridge, middle or exit) | middle |
RELAY_NICKNAME | The nickname of your relay | default |
CONTACT_GPG_FINGERPRINT | Your GPG ID or fingerprint | none |
CONTACT_NAME | Your name | none |
CONTACT_EMAIL | Your contact email | none |
RELAY_BANDWIDTH_RATE | Limit how much traffic will be allowed through your relay (must be > 20KB/s) | 10000 KBytes |
RELAY_BANDWIDTH_BURST | Allow temporary bursts up to a certain amount | 20000 KBytes |
RELAY_PORT | Default port used for incoming Tor connections (ORPort) | 9001 |