mirror of
				https://github.com/casjaysdevdocker/tor
				synced 2025-10-30 20:02:25 -04:00 
			
		
		
		
	🗃️ Update codebase 🗃️
rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/functions/entrypoint.sh rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh rootfs/usr/local/etc/docker/init.d/03-tor-server.sh rootfs/usr/local/etc/docker/init.d/09-unbound.sh rootfs/usr/local/etc/docker/init.d/98-privoxy.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
This commit is contained in:
		| @@ -168,7 +168,7 @@ user_pass="${TOR_USER_PASS_WORD:-}" # normal user password | |||||||
| [ -f "/config/env/tor.sh" ] && . "/config/env/tor.sh"               # Overwrite the variabes | [ -f "/config/env/tor.sh" ] && . "/config/env/tor.sh"               # Overwrite the variabes | ||||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| # Additional predefined variables | # Additional predefined variables | ||||||
|  | TOR_HIDDEN_SERVICE_DIR="${TOR_HIDDEN_SERVICE_DIR:-$DATA_DIR/hidden_service}" | ||||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| # Additional variables | # Additional variables | ||||||
| TOR_HIDDEN_SERVERS="${TOR_HIDDEN_SERVERS//,/ }" | TOR_HIDDEN_SERVERS="${TOR_HIDDEN_SERVERS//,/ }" | ||||||
| @@ -298,10 +298,6 @@ Log notice file $LOG_DIR/server.log | |||||||
| TransPort 0.0.0.0:9040 | TransPort 0.0.0.0:9040 | ||||||
| HTTPTunnelPort 0.0.0.0:9080 | HTTPTunnelPort 0.0.0.0:9080 | ||||||
|  |  | ||||||
| ##### hidden services |  | ||||||
| HiddenServiceDir ${TOR_HIDDEN_SERVICE_DIR:-$DATA_DIR/hidden_service} |  | ||||||
| HiddenServicePort ${TOR_HIDDEN_SERVICE_PORT:-80 127.0.0.1:80} |  | ||||||
|  |  | ||||||
| ##### security | ##### security | ||||||
| SafeLogging 1 | SafeLogging 1 | ||||||
| UseEntryGuards 1 | UseEntryGuards 1 | ||||||
| @@ -329,12 +325,12 @@ EOF | |||||||
|  |  | ||||||
| 	if [ "$TOR_HIDDEN_ENABLED" = "yes" ]; then | 	if [ "$TOR_HIDDEN_ENABLED" = "yes" ]; then | ||||||
| 		mkdir -p "$CONF_DIR/hidden.d" | 		mkdir -p "$CONF_DIR/hidden.d" | ||||||
| 		mkdir -p "$DATA_DIR/services" | 		mkdir -p "$TOR_HIDDEN_SERVICE_DIR" | ||||||
| 		chmod 700 "$DATA_DIR/services" | 		chmod 700 "$TOR_HIDDEN_SERVICE_DIR" | ||||||
| 		cat <<EOF >>"$CONF_DIR/server.conf" | 		cat <<EOF >>"$CONF_DIR/server.conf" | ||||||
| #### hidden services | #### hidden services | ||||||
| HiddenServiceDir $DATA_DIR/services/default | HiddenServiceDir $TOR_HIDDEN_SERVICE_DIR/default | ||||||
| HiddenServicePort 80 127.0.0.1:80 | HiddenServicePort ${TOR_HIDDEN_SERVICE_PORT:-80 127.0.0.1:80} | ||||||
| %include $CONF_DIR/hidden.d/*.conf | %include $CONF_DIR/hidden.d/*.conf | ||||||
|  |  | ||||||
| EOF | EOF | ||||||
| @@ -390,7 +386,7 @@ __post_execute() { | |||||||
| 		# commands to execute | 		# commands to execute | ||||||
| 		while :; do | 		while :; do | ||||||
| 			if __pgrep unbound >/dev/null 2>&1; then | 			if __pgrep unbound >/dev/null 2>&1; then | ||||||
| 				get_hidden_service_hostnames=$(find "$DATA_DIR/services" -iname 'hostname' 2>/dev/null | wc -l || echo "0") | 				get_hidden_service_hostnames=$(find "$TOR_HIDDEN_SERVICE_DIR" -iname 'hostname' 2>/dev/null | wc -l || echo "0") | ||||||
| 				break | 				break | ||||||
| 			else | 			else | ||||||
| 				sleep 10 | 				sleep 10 | ||||||
| @@ -401,10 +397,10 @@ __post_execute() { | |||||||
| 		if [ -d "/data/htdocs/www" ]; then | 		if [ -d "/data/htdocs/www" ]; then | ||||||
| 			WWW_ROOT_DIR="/data/htdocs/www" | 			WWW_ROOT_DIR="/data/htdocs/www" | ||||||
| 		fi | 		fi | ||||||
| 		if [ -d "$DATA_DIR/services" ] && [ "$get_hidden_service_hostnames" -gt 0 ]; then | 		if [ -d "$TOR_HIDDEN_SERVICE_DIR" ] && [ "$get_hidden_service_hostnames" -gt 0 ]; then | ||||||
| 			echo "Begin current hidden services" | 			echo "Begin current hidden services" | ||||||
| 			[ -f "$WWW_ROOT_DIR/hostnames.html" ] && rm -f "$WWW_ROOT_DIR/hostnames.html" | 			[ -f "$WWW_ROOT_DIR/hostnames.html" ] && rm -f "$WWW_ROOT_DIR/hostnames.html" | ||||||
| 			for host in "$DATA_DIR/services"/*/hostname; do | 			for host in "$TOR_HIDDEN_SERVICE_DIR"/*/hostname; do | ||||||
| 				d="$(dirname -- $host)" | 				d="$(dirname -- $host)" | ||||||
| 				name="$(basename "$d")" | 				name="$(basename "$d")" | ||||||
| 				url="$(<"$host")" | 				url="$(<"$host")" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user