fix: update tor/yggdrasil runtime configuration

This commit is contained in:
2026-03-01 21:38:14 -05:00
parent 4e14ce6ed6
commit 9c65411bb5
6 changed files with 18 additions and 11 deletions
+9 -2
View File
@@ -2,8 +2,11 @@
ARG UBUNTU_VERSION=24.04 ARG UBUNTU_VERSION=24.04
# === STAGE 1: Build Yggdrasil from source === # === STAGE 1: Build Yggdrasil from source ===
FROM ubuntu:${UBUNTU_VERSION} as builder_yggdrasil FROM --platform=$BUILDPLATFORM ubuntu:${UBUNTU_VERSION} as builder_yggdrasil
ARG YGGDRASIL_VERSION=v0.5.12 ARG YGGDRASIL_VERSION=v0.5.12
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETARCH
# Install build dependencies # Install build dependencies
RUN DEBIAN_FRONTEND=noninteractive \ RUN DEBIAN_FRONTEND=noninteractive \
@@ -27,6 +30,8 @@ RUN ./build
# === STAGE 2: Runtime environment === # === STAGE 2: Runtime environment ===
FROM ubuntu:${UBUNTU_VERSION} FROM ubuntu:${UBUNTU_VERSION}
ARG TARGETARCH
# Install runtime dependencies # Install runtime dependencies
RUN DEBIAN_FRONTEND=noninteractive \ RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \ apt-get update && \
@@ -74,6 +79,8 @@ COPY --from=builder_yggdrasil /BUILD_YGGDRASIL/yggdrasil-go/genkeys .
COPY ./yggdrasil.conf . COPY ./yggdrasil.conf .
# === TOR PROXY SETUP === # === TOR PROXY SETUP ===
# DNSPort
EXPOSE 9053
# SOCKS5 proxy port # SOCKS5 proxy port
EXPOSE 9050 EXPOSE 9050
EXPOSE 8118 EXPOSE 8118
@@ -86,4 +93,4 @@ COPY ./entrypoint.sh /entrypoint.sh
# Make entrypoint executable # Make entrypoint executable
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
# Default container command # Default container command
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
+2 -4
View File
@@ -1,5 +1,3 @@
version: "3.8"
services: services:
tor_yggdrasil: tor_yggdrasil:
image: tor_yggdrasil:latest image: tor_yggdrasil:latest
@@ -12,7 +10,7 @@ services:
- /dev/net/tun:/dev/net/tun # TUN device for Yggdrasil network interface - /dev/net/tun:/dev/net/tun # TUN device for Yggdrasil network interface
ports: ports:
- "127.0.0.1:9050:9050/tcp" # SOCKS5 proxy port (Tor) for application-level traffic - "127.0.0.1:9050:9050/tcp" # SOCKS5 proxy port (Tor) for application-level traffic
- "10654:10654/tcp" # Yggdrasil peer connections - "10655:10655/tcp" # Yggdrasil peer connections
environment: environment:
- YGGDRASIL_GENERATE_KEYS=true # Generate new Yggdrasil keys on startup - YGGDRASIL_GENERATE_KEYS=true # Generate new Yggdrasil keys on startup
restart: unless-stopped # Auto-restart unless manually stopped restart: unless-stopped # Auto-restart unless manually stopped
+1 -1
View File
@@ -70,4 +70,4 @@ log "One of the services has stopped. Initiating shutdown sequence..."
# Graceful termination # Graceful termination
kill $YGG_PID $TOR_PID 2>/dev/null || true kill $YGG_PID $TOR_PID 2>/dev/null || true
# Return the exit code of the failed process # Return the exit code of the failed process
exit $? exit $?
+1 -1
View File
@@ -3,4 +3,4 @@ CLEANUP_OLD_COREFILES=y
if [ -e /etc/default/tor.vidalia ] && [ -x /usr/bin/vidalia ]; then if [ -e /etc/default/tor.vidalia ] && [ -x /usr/bin/vidalia ]; then
. /etc/default/tor.vidalia . /etc/default/tor.vidalia
fi fi
Executable → Regular
+3 -1
View File
@@ -1,3 +1,5 @@
# Listen on all interfaces so other containers can reach us
DNSPort 0.0.0.0:9053
SocksPort 0.0.0.0:9050 SocksPort 0.0.0.0:9050
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy
@@ -7,4 +9,4 @@ Bridge [21f:5234:5548:31e5:a334:854b:5752:f4fc]:9770 6C4C89ABE4D06987AB1F51C0693
Bridge [224:6723:7ae0:5655:e600:51c9:4300:a2fb]:9001 F873E91048B40656694BE94ACAB6F0D32CAF8E17 Bridge [224:6723:7ae0:5655:e600:51c9:4300:a2fb]:9001 F873E91048B40656694BE94ACAB6F0D32CAF8E17
Bridge obfs4 [218:4feb:a509:9db2:2b34:6e7e:e071:5dee]:1992 F805F6B4E5E203EFE2A7FFB1E5042AFE8BD986B4 cert=0GcjnEnZ0rJ8/nfxo4ZSkjMZ0fqHSrvj/MdwEtbbuzx8qgqFTaqHTuWelGw2MxJ5wW2QaQ iat-mode=0 Bridge obfs4 [218:4feb:a509:9db2:2b34:6e7e:e071:5dee]:1992 F805F6B4E5E203EFE2A7FFB1E5042AFE8BD986B4 cert=0GcjnEnZ0rJ8/nfxo4ZSkjMZ0fqHSrvj/MdwEtbbuzx8qgqFTaqHTuWelGw2MxJ5wW2QaQ iat-mode=0
UseBridges 1 UseBridges 1
+2 -2
View File
@@ -17,7 +17,7 @@
# here. Each listener should be specified in URI format as above, e.g. # here. Each listener should be specified in URI format as above, e.g.
# tls://0.0.0.0:0 or tls://[::]:0 to listen on all interfaces. # tls://0.0.0.0:0 or tls://[::]:0 to listen on all interfaces.
Listen: [ Listen: [
tls://[::]:10654 tls://[::]:10655
] ]
# Listen address for admin connections. Default is to listen for local # Listen address for admin connections. Default is to listen for local
@@ -79,4 +79,4 @@
# or set as null. This is entirely optional but, if set, is visible # or set as null. This is entirely optional but, if set, is visible
# to the whole network on request. # to the whole network on request.
NodeInfo: {} NodeInfo: {}
} }