From 6ec1782d8b667ead501647fb442237320204084c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=BE=D0=B1?= =?UTF-8?q?=D1=8B=D1=80=D0=B5=D0=B2?= Date: Sun, 31 May 2026 13:53:37 +0300 Subject: [PATCH] fix(stable): client obfuscator targets real listening port (OBFUSCATOR_PORTS[0]) Co-Authored-By: Claude Opus 4.8 --- overlay/phobos-client.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/overlay/phobos-client.sh b/overlay/phobos-client.sh index 8a7e167..d2b8d04 100755 --- a/overlay/phobos-client.sh +++ b/overlay/phobos-client.sh @@ -6,6 +6,11 @@ check_root load_env ensure_dirs +# server.env stores OBFUSCATOR_PORTS (plural, comma list). Client obfuscator +# must target an ACTUAL listening port — derive single port from the first one. +# (Bug: default 51821 was never listened on -> client handshake failed.) +OBFUSCATOR_PORT="${OBFUSCATOR_PORT:-$(echo "${OBFUSCATOR_PORTS:-51821}" | cut -d',' -f1)}" + CMD="${1:-help}" CLIENT_ARG="${2:-}" EXTRA_ARG="${3:-}" @@ -209,8 +214,8 @@ action_package() { cp "$dir/${id}.conf" "$pkg_root/${id}.conf" cp "$dir/wg-obfuscator.conf" "$pkg_root/wg-obfuscator.conf" - # Fetch missing router-arch binaries from ClusterM on-demand (Ground-Zerro = x86_64 only) - local _tag; _tag=$(curl -fsSL -m10 https://api.github.com/repos/ClusterM/wg-obfuscator/releases/latest 2>/dev/null | grep '"tag_name"' | head -1 | sed 's/.*"tag_name": *"\(.*\)".*/\1/') + # Fetch missing router-arch binaries from ClusterM on-demand + local _tag; _tag=$(curl -fsSL -m10 https://api.github.com/repos/ClusterM/wg-obfuscator/releases/latest 2>/dev/null | grep '"tag_name"' | head -1 | sed 's/.*"tag_name": *"\(.*\)".*//') local _cb="https://github.com/ClusterM/wg-obfuscator/releases/download/${_tag}" declare -A _am=([aarch64]="linux-arm64" [mipsel]="linux-mipsel-mips32" [mips]="linux-mips-mips32" [armv7]="linux-armv7-hf" [x86_64]="linux-x64") for _arch in aarch64 mipsel mips armv7 x86_64; do @@ -262,7 +267,7 @@ action_package() { source "$PHOBOS_DIR/server/server.env" cat > "$pkg_root/failover.conf" <