From 0d2ebd59431add8adefd51f455bf9113613ded49 Mon Sep 17 00:00:00 2001 From: JerryChan <17101200+jerryxd@user.noreply.gitee.com> Date: Fri, 5 Jun 2026 05:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BAstart-hotmail-helper=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B1=80=E5=9F=9F=E7=BD=91=E7=9B=91=E5=90=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start-hotmail-helper.bat | 10 +++++++--- start-hotmail-helper.command | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/start-hotmail-helper.bat b/start-hotmail-helper.bat index 0561569..fad30cf 100644 --- a/start-hotmail-helper.bat +++ b/start-hotmail-helper.bat @@ -7,6 +7,7 @@ cd /d "%~dp0" set "HELPER_SCRIPT=scripts\hotmail_helper.py" set "LOG_DIR=data" set "START_LOG=%LOG_DIR%\hotmail-helper-start.log" +set "HELPER_HOST=0.0.0.0" if not exist "%LOG_DIR%" mkdir "%LOG_DIR%" >nul 2>nul call :log_line "launcher opened" @@ -83,7 +84,7 @@ call :check_port_available %~1 if errorlevel 1 goto :port_in_use call :log_line "starting helper on port %~1" -"%PYTHON_EXE%" %PYTHON_ARGS% "%HELPER_SCRIPT%" --port %~1 +"%PYTHON_EXE%" %PYTHON_ARGS% "%HELPER_SCRIPT%" --host %HELPER_HOST% --port %~1 set "HELPER_EXIT_CODE=%errorlevel%" call :log_line "helper exited with code %HELPER_EXIT_CODE%" if not "%HELPER_EXIT_CODE%"=="0" ( @@ -93,7 +94,7 @@ if not "%HELPER_EXIT_CODE%"=="0" ( echo Common causes: echo 1. Python is not installed or is older than 3.10. echo 2. Port %~1 is already in use. Close the old helper window or use another port. - echo 3. Security software blocked Python from starting a local 127.0.0.1 service. + echo 3. Security software or firewall blocked Python from starting the local helper service. echo. pause ) @@ -130,11 +131,14 @@ echo ------------------------------------------------------------ echo Folder: %CD% echo Python: %PYTHON_EXE% %PYTHON_ARGS% "%PYTHON_EXE%" %PYTHON_ARGS% --version -echo Helper: http://127.0.0.1:%~1 +echo Bind: %HELPER_HOST%:%~1 +echo Local: http://127.0.0.1:%~1 +echo LAN: http://:%~1 echo Check: http://127.0.0.1:%~1/health echo Log: %CD%\%START_LOG% echo ------------------------------------------------------------ echo Keep this window open while GuJumpgate is running. +echo Other devices on the same LAN can use the LAN address if your firewall allows it. echo. exit /b 0 diff --git a/start-hotmail-helper.command b/start-hotmail-helper.command index 183322e..ca6a6a4 100644 --- a/start-hotmail-helper.command +++ b/start-hotmail-helper.command @@ -4,12 +4,14 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" cd "$SCRIPT_DIR" +HOTMAIL_HELPER_HOST="${HOTMAIL_HELPER_HOST:-0.0.0.0}" + if command -v python3 >/dev/null 2>&1; then - exec python3 scripts/hotmail_helper.py "$@" + exec python3 scripts/hotmail_helper.py --host "$HOTMAIL_HELPER_HOST" "$@" fi if command -v python >/dev/null 2>&1; then - exec python scripts/hotmail_helper.py "$@" + exec python scripts/hotmail_helper.py --host "$HOTMAIL_HELPER_HOST" "$@" fi echo "Python 3 not found. Please install Python 3.10+ and try again."