aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-07-01 21:54:23 -0500
committerJesús <heckyel@hyperbola.info>2021-07-01 21:54:23 -0500
commit1b102ab95f91f7358d0223d91324748a074e3d43 (patch)
tree00687d557cdc2f41134f0bdb93f1be3c645ee264
parenta05a0a0ce7c4a8110bcc2c16976723168c489c18 (diff)
downloadyt-local-docker-1b102ab95f91f7358d0223d91324748a074e3d43.tar.lz
yt-local-docker-1b102ab95f91f7358d0223d91324748a074e3d43.tar.xz
yt-local-docker-1b102ab95f91f7358d0223d91324748a074e3d43.zip
Add max and timeout variables to config.env.example
-rw-r--r--config.env.example7
-rw-r--r--core/entrypoint.sh6
2 files changed, 10 insertions, 3 deletions
diff --git a/config.env.example b/config.env.example
index e6e59bc..20ecacf 100644
--- a/config.env.example
+++ b/config.env.example
@@ -34,3 +34,10 @@ AUTOCHECK_SUBSCRIPTIONS=True
# debug
GATHER_GOOGLEVIDEO_DOMAINS=False
DEBUGGING_SAVE_RESPONSES=False
+
+#
+# Tor options
+#
+
+MAX_CIRCUIT=500 # seconds
+CIRCUIT_TIMEOUT=500 # seconds
diff --git a/core/entrypoint.sh b/core/entrypoint.sh
index 1c15c2c..bbe05d6 100644
--- a/core/entrypoint.sh
+++ b/core/entrypoint.sh
@@ -80,9 +80,9 @@ fi
if [ "$ROUTE_TOR" = 1 ] || [ "$ROUTE_TOR" = 2 ]; then
cat > /etc/tor/torrc <<- EOF
Log notice stdout
-SocksPort 9050 # Default: Bind to localhost:9050 for local connections.
-MaxCircuitDirtiness 300
-CircuitBuildTimeout 300
+SocksPort ${TOR_PORT:-9050} # Default: Bind to localhost:9050 for local connections.
+MaxCircuitDirtiness ${MAX_CIRCUIT:-300}
+CircuitBuildTimeout ${CIRCUIT_TIMEOUT:-300}
ExcludeExitNodes {US}
StrictNodes 1
EOF