mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
Make tor-relay run.sh executable by all users (#387)
* Make tor-relay run.sh executable by all users * Add configuration for tor-relay
This commit is contained in:
parent
0c5e1b8274
commit
f9d4e19828
|
@ -34,13 +34,14 @@ COPY torrc.exit /etc/tor/torrc.exit
|
||||||
|
|
||||||
# copy the run script
|
# copy the run script
|
||||||
COPY run.sh /run.sh
|
COPY run.sh /run.sh
|
||||||
RUN chmod u+rwx /run.sh
|
RUN chmod ugo+rx /run.sh
|
||||||
|
|
||||||
# default environment variables
|
# default environment variables
|
||||||
ENV RELAY_NICKNAME hacktheplanet
|
ENV RELAY_NICKNAME hacktheplanet
|
||||||
ENV RELAY_TYPE middle
|
ENV RELAY_TYPE middle
|
||||||
ENV RELAY_BANDWIDTH_RATE 100 KBytes
|
ENV RELAY_BANDWIDTH_RATE 100 KBytes
|
||||||
ENV RELAY_BANDWIDTH_BURST 200 KBytes
|
ENV RELAY_BANDWIDTH_BURST 200 KBytes
|
||||||
|
ENV RELAY_PORT 9001
|
||||||
|
|
||||||
# make sure files are owned by tor user
|
# make sure files are owned by tor user
|
||||||
RUN chown -R tor /etc/tor
|
RUN chown -R tor /etc/tor
|
||||||
|
|
|
@ -9,6 +9,7 @@ for relaytype in bridge middle exit; do
|
||||||
sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype"
|
||||||
sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype"
|
||||||
sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype"
|
sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype"
|
||||||
|
sed -i 's/${RELAY_PORT}/'"$RELAY_PORT"'/g' "/etc/tor/torrc.$relaytype"
|
||||||
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 9001
|
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
|
||||||
|
|
|
@ -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 9001
|
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
|
||||||
|
|
|
@ -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 9001
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user