diff --git a/WebUI/vite.config.js b/WebUI/vite.config.js index 8cbc6b4..a04684c 100644 --- a/WebUI/vite.config.js +++ b/WebUI/vite.config.js @@ -5,13 +5,15 @@ import vue from '@vitejs/plugin-vue' export default defineConfig({ plugins: [vue()], server: { - port: 9948, + port: 18081, // 支持 Vue Router 的 history 模式 - historyApiFallback: true + historyApiFallback: true, + host: '127.0.0.1' }, preview: { - port: 9948, - historyApiFallback: true + port: 18081, + historyApiFallback: true, + host: '127.0.0.1' }, build: { rollupOptions: { diff --git a/app/core/config.py b/app/core/config.py index 8a86213..e3445a2 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -44,7 +44,7 @@ class Settings(BaseSettings): plugins_dir: str = "plugins" # CORS 配置 - cors_origins: str = "http://localhost:8080,http://localhost:5173,http://localhost:9948" + cors_origins: str = "http://localhost:8080,http://localhost:5173,http://127.0.0.1:18081,http://localhost:18081" @property def cors_origins_list(self) -> List[str]: diff --git a/script/start.bat b/script/start.bat index 09bf5fd..0fef7c9 100644 --- a/script/start.bat +++ b/script/start.bat @@ -5,7 +5,7 @@ echo. set "ROOT_PATH=%~dp0.." set "BACKEND_PORT=18080" -set "FRONTEND_PORT=9948" +set "FRONTEND_PORT=18081" REM 1. Clean processes on ports echo [1/4] Cleaning old processes... @@ -82,7 +82,7 @@ echo. echo === All services started === echo Backend: http://127.0.0.1:18080 -echo Frontend: http://localhost:9948 +echo Frontend: http://127.0.0.1:18081 echo. echo Press any key to close this window (services will keep running). pause >nul diff --git a/script/stop.bat b/script/stop.bat index 979c09f..7253af5 100644 --- a/script/stop.bat +++ b/script/stop.bat @@ -4,7 +4,7 @@ echo === Stopping ProxyPool Services === echo. set "BACKEND_PORT=18080" -set "FRONTEND_PORT=9948" +set "FRONTEND_PORT=18081" set "STOPPED_COUNT=0" echo [1/2] Stopping processes on ports %BACKEND_PORT% and %FRONTEND_PORT%...