Files
docker-tor-proxy/entrypoint.sh
T
Fabian Peter Hammerle 95b977d216 run tor as unprivileged user; DNS port 53 -> 9053 (breaking)
> [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
2020-03-24 20:08:49 +01:00

14 lines
348 B
Bash
Executable File

#!/bin/sh
set -e
# default: 120 sec
# https://github.com/torproject/tor/blob/tor-0.4.1.7/src/core/or/connection_edge.c#L1099
if [ -z "$SOCKS_TIMEOUT_SECONDS" ]; then
sed -e '/{socks_timeout_seconds}/d' /torrc.template > /tmp/torrc
else
sed -e "s/{socks_timeout_seconds}/$SOCKS_TIMEOUT_SECONDS/" /torrc.template > /tmp/torrc
fi
exec "$@"