From c0baa184a1ad8df231f33cd89ed00aecf9615951 Mon Sep 17 00:00:00 2001 From: casjay Date: Mon, 6 Jan 2025 14:32:40 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/tmp/etc/tor/bridge.conf rootfs/tmp/etc/tor/hidden.conf rootfs/tmp/etc/tor/relay.conf rootfs/tmp/etc/tor/server.conf rootfs/tmp/etc/tor/torrc rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh rootfs/usr/local/etc/docker/init.d/01-tor-server.sh rootfs/usr/local/etc/docker/init.d/03-privoxy.sh --- rootfs/tmp/etc/tor/bridge.conf | 0 rootfs/tmp/etc/tor/hidden.conf | 0 rootfs/tmp/etc/tor/relay.conf | 0 rootfs/tmp/etc/tor/server.conf | 17 +++++++++++++++++ rootfs/tmp/etc/tor/torrc | 15 --------------- .../local/etc/docker/init.d/01-tor-bridge.sh | 6 +++--- .../local/etc/docker/init.d/01-tor-hidden.sh | 6 +++--- .../usr/local/etc/docker/init.d/01-tor-relay.sh | 6 +++--- .../local/etc/docker/init.d/01-tor-server.sh | 6 +++--- .../usr/local/etc/docker/init.d/03-privoxy.sh | 6 +++--- 10 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 rootfs/tmp/etc/tor/bridge.conf create mode 100644 rootfs/tmp/etc/tor/hidden.conf create mode 100644 rootfs/tmp/etc/tor/relay.conf create mode 100644 rootfs/tmp/etc/tor/server.conf diff --git a/rootfs/tmp/etc/tor/bridge.conf b/rootfs/tmp/etc/tor/bridge.conf new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/tmp/etc/tor/hidden.conf b/rootfs/tmp/etc/tor/hidden.conf new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/tmp/etc/tor/relay.conf b/rootfs/tmp/etc/tor/relay.conf new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/tmp/etc/tor/server.conf b/rootfs/tmp/etc/tor/server.conf new file mode 100644 index 0000000..8882a02 --- /dev/null +++ b/rootfs/tmp/etc/tor/server.conf @@ -0,0 +1,17 @@ +##### logging +LogMessageDomains 1 +Log notice file /data/logs/tor/server.log + +##### Server +TransPort 9040 +SOCKSPort 9050 +ControlPort 9051 +HTTPTunnelPort 9080 +AddressDisableIPv6 0 + +##### socks option +SafeSocks 0 +SocksTimeout 10 + +##### include configurations +%include /config/tor/conf.d/*.conf diff --git a/rootfs/tmp/etc/tor/torrc b/rootfs/tmp/etc/tor/torrc index 1b1a076..1609a0b 100644 --- a/rootfs/tmp/etc/tor/torrc +++ b/rootfs/tmp/etc/tor/torrc @@ -1,4 +1,3 @@ -##### Configuration file RunAsDaemon 0 HardwareAccel 1 ControlSocketsGroupWritable 1 @@ -14,17 +13,3 @@ CookieAuthFile /run/tor/control.authcookie ##### logging LogMessageDomains 1 Log notice file /data/logs/tor/notice.log - -##### Server -TransPort 9040 -SOCKSPort 9050 -ControlPort 9051 -HTTPTunnelPort 9080 -AddressDisableIPv6 0 - -##### socks option -SafeSocks 0 -SocksTimeout 10 - -##### include configurations -%include /config/tor/conf.d/*.conf diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh index 8234a98..36866f2 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh @@ -237,7 +237,7 @@ __update_conf_files() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # define actions if [ "$TOR_BRIDGE_ENABLED" = "yes" ]; then - mkdir -p "$CONF_DIR/bridge" + mkdir -p "$CONF_DIR/bridge.d" cat <"$CONF_DIR/bridge.conf" #### bridge LogMessageDomains 1 @@ -255,13 +255,13 @@ AccountingMax ${TOR_ACCOUNT_MAX:-1000} GBytes AccountingStart month 1 00:00 DirPort ${TOR_DIR_PORT:-8080} DirPortFrontPage /usr/share/tor/html/exit.html -%include $CONF_DIR/bridge/*.conf +%include $CONF_DIR/bridge.d/*.conf EOF else exit 1 fi - [ -f "$CONF_DIR/bridge/default.conf" ] || touch "$CONF_DIR/bridge/default.conf" + [ -f "$CONF_DIR/bridge.d/default.conf" ] || touch "$CONF_DIR/bridge.d/default.conf" # allow custom functions if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh index 5b5dbeb..0bd8d5b 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh @@ -237,7 +237,7 @@ __update_conf_files() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # define actions if [ "$TOR_HIDDEN_ENABLED" = "yes" ]; then - mkdir -p "$CONF_DIR/hidden" + mkdir -p "$CONF_DIR/hidden.d" mkdir -p "$DATA_DIR/hidden_service" chmod 700 "$DATA_DIR/hidden_service" cat <"$CONF_DIR/hidden.conf" @@ -247,13 +247,13 @@ Log notice file $LOG_DIR/hidden.log HiddenServiceDir $DATA_DIR/hidden_service/default HiddenServicePort 80 127.0.0.1:80 -%include $CONF_DIR/hidden/*.conf +%include $CONF_DIR/hidden.d/*.conf EOF else exit 1 fi - [ -f "$CONF_DIR/hidden/default.conf" ] || touch "$CONF_DIR/hidden/default.conf" + [ -f "$CONF_DIR/hidden.d/default.conf" ] || touch "$CONF_DIR/hidden.d/default.conf" # allow custom functions if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh index 5d5e5a6..fe5f719 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh @@ -237,7 +237,7 @@ __update_conf_files() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # define actions if [ "$TOR_RELAY_ENABLED" = "yes" ]; then - mkdir -p "$CONF_DIR/relay" + mkdir -p "$CONF_DIR/relay.d" cat <"$CONF_DIR/relay.conf" ##### relay LogMessageDomains 1 @@ -245,13 +245,13 @@ Log notice file $LOG_DIR/relay.log BridgeRelay 1 PublishServerDescriptor 1 -%include $CONF_DIR/relay/*.conf +%include $CONF_DIR/relay.d/*.conf EOF else exit 1 fi - [ -f "$CONF_DIR/relay/default.conf" ] || touch "$CONF_DIR/relay/default.conf" + [ -f "$CONF_DIR/relay.d/default.conf" ] || touch "$CONF_DIR/relay.d/default.conf" # allow custom functions if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh index 5ab680a..eb139f6 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh @@ -100,9 +100,9 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='tor-server' # command to execute -EXEC_CMD_ARGS='-f $CONF_DIR/torrc' # command arguments -EXEC_PRE_SCRIPT='' # execute script before +EXEC_CMD_BIN='tor-server' # command to execute +EXEC_CMD_ARGS='-f $CONF_DIR/server.conf' # command arguments +EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Is this service a web server IS_WEB_SERVER="no" diff --git a/rootfs/usr/local/etc/docker/init.d/03-privoxy.sh b/rootfs/usr/local/etc/docker/init.d/03-privoxy.sh index cf0e8ef..eb7af6c 100755 --- a/rootfs/usr/local/etc/docker/init.d/03-privoxy.sh +++ b/rootfs/usr/local/etc/docker/init.d/03-privoxy.sh @@ -100,9 +100,9 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='privoxy' # command to execute -EXEC_CMD_ARGS='' # command arguments -EXEC_PRE_SCRIPT='' # execute script before +EXEC_CMD_BIN='privoxy' # command to execute +EXEC_CMD_ARGS='$CONF_DIR/config' # command arguments +EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Is this service a web server IS_WEB_SERVER="no"