mirror of
https://github.com/casjaysdevdocker/tor
synced 2025-01-18 00:34:29 -05:00
🗃️ Committing everything that changed 🗃️
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-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/04-tor-hidden.sh
This commit is contained in:
parent
1e19b4d586
commit
0fd0a45c36
@ -1,20 +0,0 @@
|
|||||||
##### default rc
|
|
||||||
%include /config/tor/torrc
|
|
||||||
|
|
||||||
##### 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
|
|
@ -9,3 +9,7 @@ HashedControlPassword 16:C30604D1D90F341360A14D9A1048C1DF4A3CA2411444E52EE5B954C
|
|||||||
DataDirectory /data/tor
|
DataDirectory /data/tor
|
||||||
ControlSocket /run/tor/control.sock
|
ControlSocket /run/tor/control.sock
|
||||||
CookieAuthFile /run/tor/control.authcookie
|
CookieAuthFile /run/tor/control.authcookie
|
||||||
|
|
||||||
|
##### socks option
|
||||||
|
SafeSocks 0
|
||||||
|
SocksTimeout 10
|
||||||
|
@ -234,13 +234,32 @@ __update_conf_files() {
|
|||||||
chown -Rf ${SERVICE_USER:-$RUNAS_USER}:${SERVICE_GROUP:-$RUNAS_USER} /run/tor
|
chown -Rf ${SERVICE_USER:-$RUNAS_USER}:${SERVICE_GROUP:-$RUNAS_USER} /run/tor
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# replace variables
|
# replace variables
|
||||||
[ -n "$TOR_SOCKS_SAFE" ] && sed -i 's|SafeSocks .*|SafeSocks '$TOR_SOCKS_SAFE'|g' "$CONF_DIR/torrc"
|
[ -n "$TOR_SOCKS_SAFE" ] && sed -i 's|SafeSocks .*|SafeSocks '$TOR_SOCKS_SAFE'|g' "/etc/tor/torrc"
|
||||||
[ -n "$TOR_SOCKS_TIMEOUT" ] && sed -i 's|SocksTimeout .*|SocksTimeout '$TOR_SOCKS_TIMEOUT'|g' "$CONF_DIR/torrc"
|
[ -n "$TOR_SOCKS_TIMEOUT" ] && sed -i 's|SocksTimeout .*|SocksTimeout '$TOR_SOCKS_TIMEOUT'|g' "/etc/tor/torrc"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
cat <<EOF >"$CONF_DIR/server.conf"
|
||||||
|
##### default rc
|
||||||
|
%include /etc/tor/torrc
|
||||||
|
|
||||||
|
##### logging
|
||||||
|
LogMessageDomains 1
|
||||||
|
Log notice file $LOG_DIR/server.log
|
||||||
|
|
||||||
|
##### Server
|
||||||
|
TransPort 9040
|
||||||
|
SOCKSPort 9050
|
||||||
|
ControlPort 9051
|
||||||
|
HTTPTunnelPort 9080
|
||||||
|
AddressDisableIPv6 0
|
||||||
|
|
||||||
|
##### include configurations
|
||||||
|
%include $CONF_DIR/conf.d/*.conf
|
||||||
|
|
||||||
|
EOF
|
||||||
# define actions
|
# define actions
|
||||||
if [ "$TOR_DNS_ENABLED" = "yes" ]; then
|
if [ "$TOR_DNS_ENABLED" = "yes" ]; then
|
||||||
mkdir -p "$CONF_DIR/conf.d"
|
mkdir -p "$CONF_DIR/conf.d"
|
||||||
cat <<EOF >"$CONF_DIR/conf.d/dns.conf"
|
cat <<EOF >"/$CONF_DIR/conf.d/dns.conf"
|
||||||
#### dns forwarder
|
#### dns forwarder
|
||||||
LogMessageDomains 1
|
LogMessageDomains 1
|
||||||
Log notice file $LOG_DIR/dns.log
|
Log notice file $LOG_DIR/dns.log
|
||||||
|
@ -238,7 +238,7 @@ __update_conf_files() {
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# define actions
|
# define actions
|
||||||
if [ "$TOR_RELAY_ENABLED" = "yes" ]; then
|
if [ "$TOR_RELAY_ENABLED" = "yes" ]; then
|
||||||
mkdir -p "$CONF_DIR/relay.d"
|
mkdir -p "$CONF_DIR/conf.d"
|
||||||
cat <<EOF >"$CONF_DIR/relay.conf"
|
cat <<EOF >"$CONF_DIR/relay.conf"
|
||||||
##### default rc
|
##### default rc
|
||||||
%include /config/tor/torrc
|
%include /config/tor/torrc
|
||||||
@ -250,13 +250,13 @@ Log notice file $LOG_DIR/relay.log
|
|||||||
SOCKSPort 10051
|
SOCKSPort 10051
|
||||||
BridgeRelay 1
|
BridgeRelay 1
|
||||||
PublishServerDescriptor 1
|
PublishServerDescriptor 1
|
||||||
%include $CONF_DIR/relay.d/*.conf
|
%include $CONF_DIR/conf.d/*.conf
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
[ -f "$CONF_DIR/relay.d/default.conf" ] || touch "$CONF_DIR/relay.d/default.conf"
|
[ -f "$CONF_DIR/conf.d/default.conf" ] || touch "$CONF_DIR/conf.d/default.conf"
|
||||||
|
|
||||||
# allow custom functions
|
# allow custom functions
|
||||||
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
||||||
|
@ -238,7 +238,7 @@ __update_conf_files() {
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# define actions
|
# define actions
|
||||||
if [ "$TOR_BRIDGE_ENABLED" = "yes" ]; then
|
if [ "$TOR_BRIDGE_ENABLED" = "yes" ]; then
|
||||||
mkdir -p "$CONF_DIR/bridge.d"
|
mkdir -p "$CONF_DIR/conf.d"
|
||||||
cat <<EOF >"$CONF_DIR/bridge.conf"
|
cat <<EOF >"$CONF_DIR/bridge.conf"
|
||||||
##### default rc
|
##### default rc
|
||||||
%include /config/tor/torrc
|
%include /config/tor/torrc
|
||||||
@ -260,13 +260,13 @@ AccountingMax ${TOR_ACCOUNT_MAX:-1000} GBytes
|
|||||||
AccountingStart month 1 00:00
|
AccountingStart month 1 00:00
|
||||||
DirPort ${TOR_DIR_PORT:-8080}
|
DirPort ${TOR_DIR_PORT:-8080}
|
||||||
DirPortFrontPage /usr/share/tor/html/exit.html
|
DirPortFrontPage /usr/share/tor/html/exit.html
|
||||||
%include $CONF_DIR/bridge.d/*.conf
|
%include $CONF_DIR/conf.d/*.conf
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
[ -f "$CONF_DIR/bridge.d/default.conf" ] || touch "$CONF_DIR/bridge.d/default.conf"
|
[ -f "$CONF_DIR/conf.d/default.conf" ] || touch "$CONF_DIR/conf.d/default.conf"
|
||||||
|
|
||||||
# allow custom functions
|
# allow custom functions
|
||||||
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
||||||
|
@ -238,7 +238,7 @@ __update_conf_files() {
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# define actions
|
# define actions
|
||||||
if [ "$TOR_HIDDEN_ENABLED" = "yes" ]; then
|
if [ "$TOR_HIDDEN_ENABLED" = "yes" ]; then
|
||||||
mkdir -p "$CONF_DIR/hidden.d"
|
mkdir -p "$CONF_DIR/conf.d"
|
||||||
mkdir -p "$DATA_DIR/hidden_service"
|
mkdir -p "$DATA_DIR/hidden_service"
|
||||||
chmod 700 "$DATA_DIR/hidden_service"
|
chmod 700 "$DATA_DIR/hidden_service"
|
||||||
cat <<EOF >"$CONF_DIR/hidden.conf"
|
cat <<EOF >"$CONF_DIR/hidden.conf"
|
||||||
@ -252,13 +252,13 @@ Log notice file $LOG_DIR/hidden.log
|
|||||||
SOCKSPort 10053
|
SOCKSPort 10053
|
||||||
HiddenServiceDir $DATA_DIR/hidden_service/default
|
HiddenServiceDir $DATA_DIR/hidden_service/default
|
||||||
HiddenServicePort 80 127.0.0.1:80
|
HiddenServicePort 80 127.0.0.1:80
|
||||||
%include $CONF_DIR/hidden.d/*.conf
|
%include $CONF_DIR/conf.d/*.conf
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
[ -f "$CONF_DIR/hidden.d/default.conf" ] || touch "$CONF_DIR/hidden.d/default.conf"
|
[ -f "$CONF_DIR/conf.d/default.conf" ] || touch "$CONF_DIR/conf.d/default.conf"
|
||||||
|
|
||||||
# allow custom functions
|
# allow custom functions
|
||||||
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user