🗃️ Committing everything that changed 🗃️

Dockerfile
rootfs/tmp/etc/tor/torrc
rootfs/usr/local/etc/docker/init.d/tor.sh
This commit is contained in:
casjay
2025-01-06 11:55:15 -05:00
parent 468a462a03
commit 42af54213f
3 changed files with 18 additions and 16 deletions

View File

@@ -168,7 +168,7 @@ CMD_ENV=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Per Application Variables or imports
RANDOM_NICK="$(head -n50 '/dev/random' | tr -dc 'a-zA-Z' | tr -d '[:space:]\042\047\134' | fold -w "32" | sed 's| ||g' | head -n 1)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Custom commands to run before copying to /config
__run_precopy() {
@@ -235,7 +235,21 @@ __update_conf_files() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# define actions
if [ "$TOR_BRIDGE" = "enabled" ] && ! grep -sq 'BridgeRelay' '/config/tor/torrc'; then
cat <<EOF >>/config/tor/torrc
BridgeRelay 1
ExtORPort auto
Nickname ${TOR_NICK_NAME:-$RANDOM_NICK}
ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
ORPort ${TOR_OR_PORT:-8444}
ServerTransportListenAddr obfs4 0.0.0.0:${TOR_PT_PORT:-8445}
ContactInfo ${TOR_ADMIN:-tor-admin@$HOSTNAME}
Exitpolicy accept *:*
AccountingMax ${TOR_ACCOUNT_MAX:-1000} GBytes
AccountingStart month 1 00:00
AddressDisableIPv6 0
EOF
fi
# allow custom functions
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
# exit function