From 51712310f640efde71a4d82d1d7764b958f436fb 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:56:01 +0300 Subject: [PATCH] fix: force OBFUSCATOR_PORT from OBFUSCATOR_PORTS[0] (override lib-core 51821 default) Co-Authored-By: Claude Opus 4.8 --- overlay/phobos-client.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/overlay/phobos-client.sh b/overlay/phobos-client.sh index d2b8d04..d825bea 100755 --- a/overlay/phobos-client.sh +++ b/overlay/phobos-client.sh @@ -7,9 +7,10 @@ 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)}" +# must target an ACTUAL listening port. lib-core load_env defaults OBFUSCATOR_PORT +# to 51821 (NOT listened on) -> handshake failed. Override unconditionally from +# the real port list when present. +[ -n "${OBFUSCATOR_PORTS:-}" ] && export OBFUSCATOR_PORT="$(echo "$OBFUSCATOR_PORTS" | cut -d',' -f1)" CMD="${1:-help}" CLIENT_ARG="${2:-}"