mirror of
				https://github.com/casjaysdevdocker/tor
				synced 2025-11-03 19:02:39 -05:00 
			
		
		
		
	🗃️ Committing everything that changed 🗃️
This commit is contained in:
		@@ -3,7 +3,7 @@ FROM casjaysdevdocker/nginx:latest as build
 | 
			
		||||
ARG LICENSE=WTFPL \
 | 
			
		||||
  IMAGE_NAME=tor \
 | 
			
		||||
  TIMEZONE=America/New_York \
 | 
			
		||||
  PORT="8053 80 9090"
 | 
			
		||||
  PORT="80 9053 9050 9080"
 | 
			
		||||
 | 
			
		||||
ENV SHELL=/bin/bash \
 | 
			
		||||
  TERM=xterm-256color \
 | 
			
		||||
 
 | 
			
		||||
@@ -9,11 +9,11 @@
 | 
			
		||||
# @@Copyright        :  Copyright: (c) 2022 Jason Hempstead, Casjays Developments
 | 
			
		||||
# @@Created          :  Sunday, Oct 02, 2022 16:27 EDT
 | 
			
		||||
# @@File             :  entrypoint-tor.sh
 | 
			
		||||
# @@Description      :  
 | 
			
		||||
# @@Description      :
 | 
			
		||||
# @@Changelog        :  New script
 | 
			
		||||
# @@TODO             :  Better documentation
 | 
			
		||||
# @@Other            :  
 | 
			
		||||
# @@Resource         :  
 | 
			
		||||
# @@Other            :
 | 
			
		||||
# @@Resource         :
 | 
			
		||||
# @@Terminal App     :  no
 | 
			
		||||
# @@sudo/root        :  no
 | 
			
		||||
# @@Template         :  other/docker-entrypoint
 | 
			
		||||
@@ -94,7 +94,14 @@ fi
 | 
			
		||||
[ -f "/etc/.env.sh" ] && rm -Rf "/etc/.env.sh"
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
# Additional commands
 | 
			
		||||
 | 
			
		||||
[ -d "/data/tor" ] || mkdir -p "/data/tor"
 | 
			
		||||
[ -d "/config/tor" ] || mkdir -p "/config/tor"
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
if [ -f "/config/tor/torrc" ]; then 
 | 
			
		||||
cp -Rf "/config/tor/torrc" "/etc/tor/torrc" 
 | 
			
		||||
else
 | 
			
		||||
 cp -Rf "/etc/tor/torrc" "/config/tor/torrc"
 | 
			
		||||
fi
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
case "$1" in
 | 
			
		||||
--help) # Help message
 | 
			
		||||
@@ -119,7 +126,7 @@ healthcheck) # Docker healthcheck
 | 
			
		||||
 | 
			
		||||
*) # Execute primary command
 | 
			
		||||
  if [ $# -eq 0 ]; then
 | 
			
		||||
    __exec_bash "/bin/bash"
 | 
			
		||||
    tor -f /etc/tor/torrc
 | 
			
		||||
  else
 | 
			
		||||
    __exec_bash "/bin/bash"
 | 
			
		||||
  fi
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										39
									
								
								config/tor/torrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								config/tor/torrc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
##### Configuration file for a typical Tor user
 | 
			
		||||
RunAsDaemon 0
 | 
			
		||||
ControlSocketsGroupWritable 1
 | 
			
		||||
CookieAuthentication 1
 | 
			
		||||
CookieAuthFileGroupReadable 1
 | 
			
		||||
HashedControlPassword 16:C30604D1D90F341360A14D9A1048C1DF4A3CA2411444E52EE5B954C01F
 | 
			
		||||
##### directiories and files
 | 
			
		||||
ControlSocket /run/tor/control.sock
 | 
			
		||||
CookieAuthFile /run/tor/control.authcookie
 | 
			
		||||
DataDirectory /data/tor
 | 
			
		||||
##### logging
 | 
			
		||||
Log notice file /var/log/tor/notices.log
 | 
			
		||||
#Log debug file /var/log/tor/debug.log
 | 
			
		||||
 | 
			
		||||
##### This section is just for location-hidden services 
 | 
			
		||||
HiddenServiceDir /data/tor/hidden_service/default
 | 
			
		||||
HiddenServicePort 80 127.0.0.2:8082
 | 
			
		||||
 | 
			
		||||
##### Server 
 | 
			
		||||
ControlPort 9051
 | 
			
		||||
SOCKSPort 9050
 | 
			
		||||
HTTPTunnelPort 9080
 | 
			
		||||
 | 
			
		||||
##### dns forwarder
 | 
			
		||||
DNSPort 9053
 | 
			
		||||
AutomapHostsOnResolve 1
 | 
			
		||||
AutomapHostsSuffixes .exit,.onion
 | 
			
		||||
 | 
			
		||||
##### This section is just for relays 
 | 
			
		||||
#Nickname whateveryouwant
 | 
			
		||||
#ContactInfo tor-admin@example.com
 | 
			
		||||
#ORPort 443
 | 
			
		||||
#Exitpolicy reject *:*
 | 
			
		||||
#AccountingMax 100 GBytes
 | 
			
		||||
#AccountingStart month 1 00:00
 | 
			
		||||
#RelayBandwidthRate 5120 KBytes
 | 
			
		||||
#RelayBandwidthBurst 10240 KBytes
 | 
			
		||||
#DisableDebuggerAttachment 0
 | 
			
		||||
#HardwareAccel 1
 | 
			
		||||
		Reference in New Issue
	
	Block a user