diff --git a/Dockerfile b/Dockerfile index 6d297a4..7a3e82f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ ARG USER="root" ARG SHELL_OPTS="set -e -o pipefail" ARG SERVICE_PORT="80" -ARG EXPOSE_PORTS="80 8118 9040 9050 9053 9080" +ARG EXPOSE_PORTS="80 8118 9040 9050 9053 9080 58000-58004" ARG PHP_VERSION="system" ARG NODE_VERSION="system" ARG NODE_MANAGER="system" diff --git a/rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh b/rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh index b685f96..0bb2c9a 100755 --- a/rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh +++ b/rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh @@ -261,6 +261,10 @@ LogMessageDomains 1 Log notice file $LOG_DIR/tor-relay.log SOCKSPort 10051 + +ServerTransportPlugin obfs4 exec /usr/bin/lyrebird +ServerTransportListenAddr obfs4 0.0.0.0:${TOR_RELAY_PORT:-58004} + BridgeRelay 0 PublishServerDescriptor 1 Nickname ${TOR_NICK_NAME:-$RANDOM_NICK}-relay diff --git a/rootfs/usr/local/etc/docker/init.d/03-tor-bridge.sh b/rootfs/usr/local/etc/docker/init.d/03-tor-bridge.sh index 7775931..caa5e90 100755 --- a/rootfs/usr/local/etc/docker/init.d/03-tor-bridge.sh +++ b/rootfs/usr/local/etc/docker/init.d/03-tor-bridge.sh @@ -261,19 +261,20 @@ LogMessageDomains 1 Log notice file $LOG_DIR/tor-bridge.log SOCKSPort 10052 + ServerTransportPlugin obfs4 exec /usr/bin/lyrebird -ServerTransportListenAddr obfs4 0.0.0.0:${TOR_PT_PORT:-8445} +ServerTransportListenAddr obfs4 0.0.0.0:${TOR_PT_PORT:-58000} BridgeRelay 1 PublishServerDescriptor 1 ExtORPort auto Exitpolicy accept *:* -ORPort ${TOR_OR_PORT:-8444} +ORPort ${TOR_OR_PORT:-58001} +DirPort ${TOR_DIR_PORT:-58002} Nickname ${TOR_NICK_NAME:-$RANDOM_NICK} ContactInfo ${TOR_ADMIN:-tor-admin@$HOSTNAME} AccountingMax ${TOR_ACCOUNT_MAX:-1000} GBytes AccountingStart month 1 00:00 -DirPort ${TOR_DIR_PORT:-8080} DirPortFrontPage /usr/share/tor/html/exit.html %include $CONF_DIR/conf.d/*.conf