mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
update tor-relay
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
3a10b0889e
commit
55513d40f6
|
@ -3,13 +3,15 @@ set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
for relaytype in bridge middle exit; do
|
for relaytype in bridge middle exit; do
|
||||||
sed -i 's/${RELAY_NICKNAME}/'"$RELAY_NICKNAME"'/g' "/etc/tor/torrc.$relaytype"
|
file="/etc/tor/torrc.${relaytype}"
|
||||||
sed -i 's/${CONTACT_GPG_FINGERPRINT}/'"$CONTACT_GPG_FINGERPRINT"'/g' "/etc/tor/torrc.$relaytype"
|
|
||||||
sed -i 's/${CONTACT_NAME}/'"$CONTACT_NAME"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i "s/RELAY_NICKNAME/${RELAY_NICKNAME}/g" "$file"
|
||||||
sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i "s/CONTACT_GPG_FINGERPRINT/${CONTACT_GPG_FINGERPRINT}/g" "$file"
|
||||||
sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i "s/CONTACT_NAME/${CONTACT_NAME}/g" "$file"
|
||||||
sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i "s/CONTACT_EMAIL/${CONTACT_EMAIL}/g" "$file"
|
||||||
sed -i 's/${RELAY_PORT}/'"$RELAY_PORT"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i "s/RELAY_BANDWIDTH_RATE/${RELAY_BANDWIDTH_RATE}/g" "$file"
|
||||||
|
sed -i "s/RELAY_BANDWIDTH_BURST/${RELAY_BANDWIDTH_BURST}/g" "$file"
|
||||||
|
sed -i "s/RELAY_PORT/${RELAY_PORT}/g" "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
exec tor -f "/etc/tor/torrc.${RELAY_TYPE}"
|
exec tor -f "/etc/tor/torrc.${RELAY_TYPE}"
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
||||||
|
|
||||||
## Required: what port to advertise for incoming Tor connections.
|
## Required: what port to advertise for incoming Tor connections.
|
||||||
ORPort ${RELAY_PORT}
|
ORPort RELAY_PORT
|
||||||
## If you want to listen on a port other than the one advertised in
|
## If you want to listen on a port other than the one advertised in
|
||||||
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
||||||
## follows. You'll need to do ipchains or other port forwarding
|
## follows. You'll need to do ipchains or other port forwarding
|
||||||
|
@ -97,7 +97,7 @@ ORPort ${RELAY_PORT}
|
||||||
# OutboundBindAddress 10.0.0.5
|
# OutboundBindAddress 10.0.0.5
|
||||||
|
|
||||||
## A handle for your relay, so people don't have to refer to it by key.
|
## A handle for your relay, so people don't have to refer to it by key.
|
||||||
Nickname ${RELAY_NICKNAME}
|
Nickname RELAY_NICKNAME
|
||||||
|
|
||||||
## Define these to limit how much relayed traffic you will allow. Your
|
## Define these to limit how much relayed traffic you will allow. Your
|
||||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||||
|
@ -107,8 +107,8 @@ Nickname ${RELAY_NICKNAME}
|
||||||
## 2^20, etc.
|
## 2^20, etc.
|
||||||
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||||
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||||
RelayBandwidthRate ${RELAY_BANDWIDTH_RATE}
|
RelayBandwidthRate RELAY_BANDWIDTH_RATE
|
||||||
RelayBandwidthBurst ${RELAY_BANDWIDTH_BURST}
|
RelayBandwidthBurst RELAY_BANDWIDTH_BURST
|
||||||
|
|
||||||
## Use these to restrict the maximum traffic per day, week, or month.
|
## Use these to restrict the maximum traffic per day, week, or month.
|
||||||
## Note that this threshold applies separately to sent and received bytes,
|
## Note that this threshold applies separately to sent and received bytes,
|
||||||
|
@ -131,7 +131,7 @@ RelayBandwidthBurst ${RELAY_BANDWIDTH_BURST}
|
||||||
## it's an email address and/or generate a new address for this purpose.
|
## it's an email address and/or generate a new address for this purpose.
|
||||||
#ContactInfo Random Person <nobody AT example dot com>
|
#ContactInfo Random Person <nobody AT example dot com>
|
||||||
## You might also include your PGP or GPG fingerprint if you have one:
|
## You might also include your PGP or GPG fingerprint if you have one:
|
||||||
ContactInfo ${CONTACT_GPG_FINGERPRINT} ${CONTACT_NAME} ${CONTACT_EMAIL}
|
ContactInfo CONTACT_GPG_FINGERPRINT CONTACT_NAME CONTACT_EMAIL
|
||||||
|
|
||||||
## Uncomment this to mirror directory information for others. Please do
|
## Uncomment this to mirror directory information for others. Please do
|
||||||
## if you have enough bandwidth.
|
## if you have enough bandwidth.
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
||||||
|
|
||||||
## Required: what port to advertise for incoming Tor connections.
|
## Required: what port to advertise for incoming Tor connections.
|
||||||
ORPort ${RELAY_PORT}
|
ORPort RELAY_PORT
|
||||||
## If you want to listen on a port other than the one advertised in
|
## If you want to listen on a port other than the one advertised in
|
||||||
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
||||||
## follows. You'll need to do ipchains or other port forwarding
|
## follows. You'll need to do ipchains or other port forwarding
|
||||||
|
@ -97,7 +97,7 @@ ORPort ${RELAY_PORT}
|
||||||
# OutboundBindAddress 10.0.0.5
|
# OutboundBindAddress 10.0.0.5
|
||||||
|
|
||||||
## A handle for your relay, so people don't have to refer to it by key.
|
## A handle for your relay, so people don't have to refer to it by key.
|
||||||
Nickname ${RELAY_NICKNAME}
|
Nickname RELAY_NICKNAME
|
||||||
|
|
||||||
## Define these to limit how much relayed traffic you will allow. Your
|
## Define these to limit how much relayed traffic you will allow. Your
|
||||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||||
|
@ -107,8 +107,8 @@ Nickname ${RELAY_NICKNAME}
|
||||||
## 2^20, etc.
|
## 2^20, etc.
|
||||||
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||||
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||||
RelayBandwidthRate ${RELAY_BANDWIDTH_RATE}
|
RelayBandwidthRate RELAY_BANDWIDTH_RATE
|
||||||
RelayBandwidthBurst ${RELAY_BANDWIDTH_BURST}
|
RelayBandwidthBurst RELAY_BANDWIDTH_BURST
|
||||||
|
|
||||||
## Use these to restrict the maximum traffic per day, week, or month.
|
## Use these to restrict the maximum traffic per day, week, or month.
|
||||||
## Note that this threshold applies separately to sent and received bytes,
|
## Note that this threshold applies separately to sent and received bytes,
|
||||||
|
@ -131,7 +131,7 @@ RelayBandwidthBurst ${RELAY_BANDWIDTH_BURST}
|
||||||
## it's an email address and/or generate a new address for this purpose.
|
## it's an email address and/or generate a new address for this purpose.
|
||||||
#ContactInfo Random Person <nobody AT example dot com>
|
#ContactInfo Random Person <nobody AT example dot com>
|
||||||
## You might also include your PGP or GPG fingerprint if you have one:
|
## You might also include your PGP or GPG fingerprint if you have one:
|
||||||
ContactInfo ${CONTACT_GPG_FINGERPRINT} ${CONTACT_NAME} ${CONTACT_EMAIL}
|
ContactInfo CONTACT_GPG_FINGERPRINT CONTACT_NAME CONTACT_EMAIL
|
||||||
|
|
||||||
## Uncomment this to mirror directory information for others. Please do
|
## Uncomment this to mirror directory information for others. Please do
|
||||||
## if you have enough bandwidth.
|
## if you have enough bandwidth.
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
||||||
|
|
||||||
## Required: what port to advertise for incoming Tor connections.
|
## Required: what port to advertise for incoming Tor connections.
|
||||||
ORPort ${RELAY_PORT}
|
ORPort RELAY_PORT
|
||||||
## If you want to listen on a port other than the one advertised in
|
## If you want to listen on a port other than the one advertised in
|
||||||
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
||||||
## follows. You'll need to do ipchains or other port forwarding
|
## follows. You'll need to do ipchains or other port forwarding
|
||||||
|
@ -97,7 +97,7 @@ ORPort ${RELAY_PORT}
|
||||||
# OutboundBindAddress 10.0.0.5
|
# OutboundBindAddress 10.0.0.5
|
||||||
|
|
||||||
## A handle for your relay, so people don't have to refer to it by key.
|
## A handle for your relay, so people don't have to refer to it by key.
|
||||||
Nickname ${RELAY_NICKNAME}
|
Nickname RELAY_NICKNAME
|
||||||
|
|
||||||
## Define these to limit how much relayed traffic you will allow. Your
|
## Define these to limit how much relayed traffic you will allow. Your
|
||||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||||
|
@ -107,8 +107,8 @@ Nickname ${RELAY_NICKNAME}
|
||||||
## 2^20, etc.
|
## 2^20, etc.
|
||||||
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||||
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||||
RelayBandwidthRate ${RELAY_BANDWIDTH_RATE}
|
RelayBandwidthRate RELAY_BANDWIDTH_RATE
|
||||||
RelayBandwidthBurst ${RELAY_BANDWIDTH_BURST}
|
RelayBandwidthBurst RELAY_BANDWIDTH_BURST
|
||||||
|
|
||||||
## Use these to restrict the maximum traffic per day, week, or month.
|
## Use these to restrict the maximum traffic per day, week, or month.
|
||||||
## Note that this threshold applies separately to sent and received bytes,
|
## Note that this threshold applies separately to sent and received bytes,
|
||||||
|
@ -131,7 +131,7 @@ RelayBandwidthBurst ${RELAY_BANDWIDTH_BURST}
|
||||||
## it's an email address and/or generate a new address for this purpose.
|
## it's an email address and/or generate a new address for this purpose.
|
||||||
#ContactInfo Random Person <nobody AT example dot com>
|
#ContactInfo Random Person <nobody AT example dot com>
|
||||||
## You might also include your PGP or GPG fingerprint if you have one:
|
## You might also include your PGP or GPG fingerprint if you have one:
|
||||||
ContactInfo ${CONTACT_GPG_FINGERPRINT} ${CONTACT_NAME} ${CONTACT_EMAIL}
|
ContactInfo CONTACT_GPG_FINGERPRINT CONTACT_NAME CONTACT_EMAIL
|
||||||
|
|
||||||
## Uncomment this to mirror directory information for others. Please do
|
## Uncomment this to mirror directory information for others. Please do
|
||||||
## if you have enough bandwidth.
|
## if you have enough bandwidth.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user