From fcff97bae2ca7189e5eea406e0ca8aafbedba32b Mon Sep 17 00:00:00 2001 From: Daniel Bedeleanu Date: Tue, 21 Apr 2026 15:27:28 +0300 Subject: [PATCH] fix: bind SSL proxies to SERVER_IP for VPN/remote access local-ssl-proxy was binding to 0.0.0.0 which doesn't work reliably for cross-network access (VPN, remote clients). Now binds to SERVER_IP from inventory.env, ensuring the proxy is reachable from all networks that can reach the server's main IP address. --- start_server.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/start_server.sh b/start_server.sh index 71d27256..9afcc392 100755 --- a/start_server.sh +++ b/start_server.sh @@ -114,8 +114,11 @@ ALLOWED_DEV_ORIGINS="$ALLOWED_DEV_ORIGINS" npm run dev -- -p $FRONTEND_PORT & cd .. # 6. Start Proxies (Crucial for Mobile/Tablet Camera & Sync) -npx local-ssl-proxy --source $BACKEND_SSL_PORT --target $BACKEND_PORT --hostname 0.0.0.0 > /dev/null 2>&1 & -npx local-ssl-proxy --source $FRONTEND_SSL_PORT --target $FRONTEND_PORT --hostname 0.0.0.0 > /dev/null 2>&1 & +# Bind to SERVER_IP (not 0.0.0.0) so VPN/remote clients can reach the server +PROXY_HOSTNAME=${SERVER_IP:-0.0.0.0} +echo "🔐 Starting SSL proxies on $PROXY_HOSTNAME..." +npx local-ssl-proxy --source $BACKEND_SSL_PORT --target $BACKEND_PORT --hostname $PROXY_HOSTNAME > /dev/null 2>&1 & +npx local-ssl-proxy --source $FRONTEND_SSL_PORT --target $FRONTEND_PORT --hostname $PROXY_HOSTNAME > /dev/null 2>&1 & # 7. Print Unified Access Banner