fix: 更换前端端口 9948 -> 18081 解决 Windows 权限问题

- 前端端口改为 18081
- 添加 host: 127.0.0.1 配置
- 更新 CORS 允许新前端地址
- 更新启动/停止脚本
This commit is contained in:
祀梦
2026-04-04 13:38:08 +08:00
parent eeb16774d7
commit abb8b32ed3
4 changed files with 10 additions and 8 deletions

View File

@@ -5,13 +5,15 @@ import vue from '@vitejs/plugin-vue'
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [vue()],
server: { server: {
port: 9948, port: 18081,
// 支持 Vue Router 的 history 模式 // 支持 Vue Router 的 history 模式
historyApiFallback: true historyApiFallback: true,
host: '127.0.0.1'
}, },
preview: { preview: {
port: 9948, port: 18081,
historyApiFallback: true historyApiFallback: true,
host: '127.0.0.1'
}, },
build: { build: {
rollupOptions: { rollupOptions: {

View File

@@ -44,7 +44,7 @@ class Settings(BaseSettings):
plugins_dir: str = "plugins" plugins_dir: str = "plugins"
# CORS 配置 # 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 @property
def cors_origins_list(self) -> List[str]: def cors_origins_list(self) -> List[str]:

View File

@@ -5,7 +5,7 @@ echo.
set "ROOT_PATH=%~dp0.." set "ROOT_PATH=%~dp0.."
set "BACKEND_PORT=18080" set "BACKEND_PORT=18080"
set "FRONTEND_PORT=9948" set "FRONTEND_PORT=18081"
REM 1. Clean processes on ports REM 1. Clean processes on ports
echo [1/4] Cleaning old processes... echo [1/4] Cleaning old processes...
@@ -82,7 +82,7 @@ echo.
echo === All services started === echo === All services started ===
echo Backend: http://127.0.0.1:18080 echo Backend: http://127.0.0.1:18080
echo Frontend: http://localhost:9948 echo Frontend: http://127.0.0.1:18081
echo. echo.
echo Press any key to close this window (services will keep running). echo Press any key to close this window (services will keep running).
pause >nul pause >nul

View File

@@ -4,7 +4,7 @@ echo === Stopping ProxyPool Services ===
echo. echo.
set "BACKEND_PORT=18080" set "BACKEND_PORT=18080"
set "FRONTEND_PORT=9948" set "FRONTEND_PORT=18081"
set "STOPPED_COUNT=0" set "STOPPED_COUNT=0"
echo [1/2] Stopping processes on ports %BACKEND_PORT% and %FRONTEND_PORT%... echo [1/2] Stopping processes on ports %BACKEND_PORT% and %FRONTEND_PORT%...