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