mirror of
https://github.com/casjaysdevdocker/tor
synced 2025-01-18 00:34:29 -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:
parent
ccf0a1d772
commit
2142a2990b
@ -260,7 +260,7 @@ SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
|
||||
LogMessageDomains 1
|
||||
Log notice file $LOG_DIR/tor-bridge.log
|
||||
|
||||
SOCKSPort 10052
|
||||
SOCKSPort 0
|
||||
|
||||
ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
|
||||
ServerTransportListenAddr obfs4 0.0.0.0:${TOR_BRIDGE_PT_PORT:-57003}
|
@ -260,7 +260,7 @@ SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
|
||||
LogMessageDomains 1
|
||||
Log notice file $LOG_DIR/tor-relay.log
|
||||
|
||||
SOCKSPort 10051
|
||||
SOCKSPort 0
|
||||
|
||||
ServerTransportPlugin obfs4 exec /usr/bin/lyrebird
|
||||
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
|
||||
|
||||
TOR_HIDDEN_SERVERS="${TOR_HIDDEN_SERVERS//,/ }"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Specifiy custom directories to be created
|
||||
ADD_APPLICATION_FILES=""
|
||||
@ -189,7 +189,7 @@ __execute_prerun() {
|
||||
# Define environment
|
||||
local hostname=${HOSTNAME}
|
||||
# Define actions/commands
|
||||
|
||||
sleep 30
|
||||
# allow custom functions
|
||||
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"
|
||||
##### Server
|
||||
RunAsDaemon 0
|
||||
HardwareAccel 1
|
||||
AddressDisableIPv6 0
|
||||
VirtualAddrNetwork 10.0.0.0/12
|
||||
|
||||
#### control settings
|
||||
ControlPort 0.0.0.0:9051
|
||||
ControlSocketsGroupWritable 1
|
||||
CookieAuthentication 1
|
||||
CookieAuthFileGroupReadable 1
|
||||
@ -252,17 +258,17 @@ CookieAuthFile $RUN_DIR/server.authcookie
|
||||
##### socks option
|
||||
SafeSocks ${TOR_SOCKS_SAFE:-0}
|
||||
SocksTimeout ${TOR_SOCKS_TIMEOUT:-10}
|
||||
SOCKSPolicy accept *
|
||||
SOCKSPolicy accept6 *
|
||||
SOCKSPort 0.0.0.0:9050
|
||||
|
||||
##### logging
|
||||
LogMessageDomains 1
|
||||
Log notice file $LOG_DIR/tor-server.log
|
||||
|
||||
##### Server
|
||||
TransPort 9040
|
||||
SOCKSPort 9050
|
||||
ControlPort 9051
|
||||
HTTPTunnelPort 9080
|
||||
AddressDisableIPv6 0
|
||||
##### port mappings
|
||||
TransPort 0.0.0.0:9040
|
||||
HTTPTunnelPort 0.0.0.0:9080
|
||||
|
||||
EOF
|
||||
# define actions
|
||||
@ -293,7 +299,14 @@ HiddenServicePort 80 127.0.0.1:80
|
||||
|
||||
EOF
|
||||
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"
|
||||
##### include configurations
|
||||
%include $CONF_DIR/conf.d/*.conf
|
||||
@ -341,6 +354,9 @@ __post_execute() {
|
||||
# show message
|
||||
__banner "$postMessageST"
|
||||
# commands to execute
|
||||
while :; do
|
||||
pgrep unbound && break || sleep 30
|
||||
done
|
||||
if [ -d "$DATA_DIR/services" ]; then
|
||||
for d in "$DATA_DIR/services"/*;do
|
||||
for host in "$d"/hostname; do
|
Loading…
x
Reference in New Issue
Block a user