fix: 更换后端端口 9949 -> 18080 解决 Windows 绑定权限问题

- 修改后端默认端口为 18080
- 更新前端 API 配置支持新端口
- 更新启动/停止脚本端口配置
- 添加 .env 配置文件
This commit is contained in:
祀梦
2026-04-04 13:37:17 +08:00
parent 38bd66128b
commit eeb16774d7
4 changed files with 6 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ echo === ProxyPool Startup ===
echo.
set "ROOT_PATH=%~dp0.."
set "BACKEND_PORT=9949"
set "BACKEND_PORT=18080"
set "FRONTEND_PORT=9948"
REM 1. Clean processes on ports
@@ -53,7 +53,7 @@ ping -n 3 127.0.0.1 >nul 2>&1
set /a RETRY_COUNT+=1
REM Try to connect to backend health endpoint
powershell -Command "try { $r = Invoke-RestMethod -Uri 'http://127.0.0.1:9949/health' -TimeoutSec 2 -ErrorAction Stop; exit 0 } catch { exit 1 }" >nul 2>&1
powershell -Command "try { $r = Invoke-RestMethod -Uri 'http://127.0.0.1:18080/health' -TimeoutSec 2 -ErrorAction Stop; exit 0 } catch { exit 1 }" >nul 2>&1
if %errorlevel% equ 0 (
set BACKEND_READY=1
goto WAIT_DONE
@@ -81,7 +81,7 @@ echo Frontend started
echo.
echo === All services started ===
echo Backend: http://127.0.0.1:9949
echo Backend: http://127.0.0.1:18080
echo Frontend: http://localhost:9948
echo.
echo Press any key to close this window (services will keep running).

View File

@@ -3,7 +3,7 @@ chcp 65001 >nul
echo === Stopping ProxyPool Services ===
echo.
set "BACKEND_PORT=9949"
set "BACKEND_PORT=18080"
set "FRONTEND_PORT=9948"
set "STOPPED_COUNT=0"