mirror of
				https://github.com/casjaysdevdocker/tor
				synced 2025-11-04 01:02:49 -05:00 
			
		
		
		
	🗃️ Committing everything that changed 🗃️
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				release-tag / release-image (push) Waiting to run
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	release-tag / release-image (push) Waiting to run
				
			rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh rootfs/usr/local/etc/docker/init.d/01-tor-server.sh rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh rootfs/usr/local/etc/docker/init.d/03-tor-bridge.sh rootfs/usr/local/etc/docker/init.d/03-tor-server.sh rootfs/usr/local/etc/docker/init.d/98-php.sh rootfs/usr/local/etc/docker/init.d/98-privoxy.sh rootfs/usr/local/etc/docker/init.d/99-php.sh rootfs/usr/local/etc/docker/init.d/99-privoxy.sh
This commit is contained in:
		@@ -260,7 +260,7 @@ SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
 | 
				
			|||||||
LogMessageDomains 1
 | 
					LogMessageDomains 1
 | 
				
			||||||
Log notice file $LOG_DIR/tor-bridge.log
 | 
					Log notice file $LOG_DIR/tor-bridge.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SOCKSPort 10052
 | 
					SOCKSPort 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
 | 
					ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
 | 
				
			||||||
ServerTransportListenAddr obfs4 0.0.0.0:${TOR_BRIDGE_PT_PORT:-57003}
 | 
					ServerTransportListenAddr obfs4 0.0.0.0:${TOR_BRIDGE_PT_PORT:-57003}
 | 
				
			||||||
@@ -260,7 +260,7 @@ SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
 | 
				
			|||||||
LogMessageDomains 1
 | 
					LogMessageDomains 1
 | 
				
			||||||
Log notice file $LOG_DIR/tor-relay.log
 | 
					Log notice file $LOG_DIR/tor-relay.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SOCKSPort 10051
 | 
					SOCKSPort 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
 | 
					ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
 | 
				
			||||||
ServerTransportListenAddr obfs4 0.0.0.0:${TOR_RELAY_PORT:-57000}
 | 
					ServerTransportListenAddr obfs4 0.0.0.0:${TOR_RELAY_PORT:-57000}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -149,7 +149,7 @@ user_pass="${TOR_USER_PASS_WORD:-}" # normal user password
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
# Additional variables
 | 
					# Additional variables
 | 
				
			||||||
 | 
					TOR_HIDDEN_SERVERS="${TOR_HIDDEN_SERVERS//,/ }"
 | 
				
			||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
# Specifiy custom directories to be created
 | 
					# Specifiy custom directories to be created
 | 
				
			||||||
ADD_APPLICATION_FILES=""
 | 
					ADD_APPLICATION_FILES=""
 | 
				
			||||||
@@ -189,7 +189,7 @@ __execute_prerun() {
 | 
				
			|||||||
  # Define environment
 | 
					  # Define environment
 | 
				
			||||||
  local hostname=${HOSTNAME}
 | 
					  local hostname=${HOSTNAME}
 | 
				
			||||||
  # Define actions/commands
 | 
					  # Define actions/commands
 | 
				
			||||||
 | 
					  sleep 30
 | 
				
			||||||
  # allow custom functions
 | 
					  # allow custom functions
 | 
				
			||||||
  if builtin type -t __execute_prerun_local | grep -q 'function'; then __execute_prerun_local; fi
 | 
					  if builtin type -t __execute_prerun_local | grep -q 'function'; then __execute_prerun_local; fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -237,8 +237,14 @@ __update_conf_files() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
  cat <<EOF >>"$CONF_DIR/server.conf"
 | 
					  cat <<EOF >>"$CONF_DIR/server.conf"
 | 
				
			||||||
 | 
					##### Server
 | 
				
			||||||
RunAsDaemon 0
 | 
					RunAsDaemon 0
 | 
				
			||||||
HardwareAccel 1
 | 
					HardwareAccel 1
 | 
				
			||||||
 | 
					AddressDisableIPv6 0
 | 
				
			||||||
 | 
					VirtualAddrNetwork 10.0.0.0/12
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### control settings
 | 
				
			||||||
 | 
					ControlPort 0.0.0.0:9051
 | 
				
			||||||
ControlSocketsGroupWritable 1
 | 
					ControlSocketsGroupWritable 1
 | 
				
			||||||
CookieAuthentication 1
 | 
					CookieAuthentication 1
 | 
				
			||||||
CookieAuthFileGroupReadable 1
 | 
					CookieAuthFileGroupReadable 1
 | 
				
			||||||
@@ -252,17 +258,17 @@ CookieAuthFile $RUN_DIR/server.authcookie
 | 
				
			|||||||
##### socks option
 | 
					##### socks option
 | 
				
			||||||
SafeSocks ${TOR_SOCKS_SAFE:-0}
 | 
					SafeSocks ${TOR_SOCKS_SAFE:-0}
 | 
				
			||||||
SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
 | 
					SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
 | 
				
			||||||
 | 
					SOCKSPolicy accept *
 | 
				
			||||||
 | 
					SOCKSPolicy accept6 *
 | 
				
			||||||
 | 
					SOCKSPort 0.0.0.0:9050
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##### logging
 | 
					##### logging
 | 
				
			||||||
LogMessageDomains 1
 | 
					LogMessageDomains 1
 | 
				
			||||||
Log notice file $LOG_DIR/tor-server.log
 | 
					Log notice file $LOG_DIR/tor-server.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##### Server
 | 
					##### port mappings
 | 
				
			||||||
TransPort 9040
 | 
					TransPort 0.0.0.0:9040
 | 
				
			||||||
SOCKSPort 9050
 | 
					HTTPTunnelPort 0.0.0.0:9080
 | 
				
			||||||
ControlPort 9051
 | 
					 | 
				
			||||||
HTTPTunnelPort 9080
 | 
					 | 
				
			||||||
AddressDisableIPv6 0
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
  # define actions
 | 
					  # define actions
 | 
				
			||||||
@@ -293,7 +299,14 @@ HiddenServicePort 80 127.0.0.1:80
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					  if [ -n "$TOR_HIDDEN_SERVERS" ]; then
 | 
				
			||||||
 | 
					    for hidden_server in $TOR_HIDDEN_SERVERS: do
 | 
				
			||||||
 | 
					      name="$(echo "$hidden_server"|awk -F: '{print $1}')"
 | 
				
			||||||
 | 
					      port="$(echo "$hidden_server"|awk -F: '{print $2}')"
 | 
				
			||||||
 | 
					      host="$(echo "$hidden_server"|awk -F: '{print $3":"$4}')"
 | 
				
			||||||
 | 
					      echo ""
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
  cat <<EOF >>"$CONF_DIR/server.conf"
 | 
					  cat <<EOF >>"$CONF_DIR/server.conf"
 | 
				
			||||||
##### include configurations
 | 
					##### include configurations
 | 
				
			||||||
%include $CONF_DIR/conf.d/*.conf
 | 
					%include $CONF_DIR/conf.d/*.conf
 | 
				
			||||||
@@ -341,6 +354,9 @@ __post_execute() {
 | 
				
			|||||||
    # show message
 | 
					    # show message
 | 
				
			||||||
    __banner "$postMessageST"
 | 
					    __banner "$postMessageST"
 | 
				
			||||||
    # commands to execute
 | 
					    # commands to execute
 | 
				
			||||||
 | 
					    while :; do
 | 
				
			||||||
 | 
					      pgrep unbound && break || sleep 30
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
    if [ -d "$DATA_DIR/services" ]; then
 | 
					    if [ -d "$DATA_DIR/services" ]; then
 | 
				
			||||||
      for d in "$DATA_DIR/services"/*;do
 | 
					      for d in "$DATA_DIR/services"/*;do
 | 
				
			||||||
        for host in "$d"/hostname; do
 | 
					        for host in "$d"/hostname; do
 | 
				
			||||||
		Reference in New Issue
	
	Block a user