This commit is contained in:
Your Name
2026-02-12 16:51:15 +08:00
parent e643766b95
commit 57e525032c

View File

@@ -7,7 +7,7 @@ import os
# ─── 服务 ───
HOST: str = os.getenv("SERVER_HOST", "0.0.0.0")
PORT: int = int(os.getenv("SERVER_PORT", "8000"))
PORT: int = int(os.getenv("SERVER_PORT", "9000")) # 云服务器主端口
# ─── WebSocket ───
WS_PATH: str = "/ws" # Worker 连接端点
@@ -18,6 +18,6 @@ HEARTBEAT_TIMEOUT: int = 90 # 超时未收到心跳视为离
API_TOKEN: str = os.getenv("API_TOKEN", "") # 非空时校验 Header: Authorization: Bearer <token>
# ─── 隧道(内网穿透) ───
TUNNEL_CONTROL_PORT: int = int(os.getenv("TUNNEL_CONTROL_PORT", "8001")) # 隧道客户端连接
TUNNEL_STREAM_PORT: int = int(os.getenv("TUNNEL_STREAM_PORT", "8003")) # 流连接(客户端连此端口桥接)
TUNNEL_PROXY_BASE_PORT: int = int(os.getenv("TUNNEL_PROXY_BASE_PORT", "8010")) # 代理端口起始(8010=worker1, 8011=worker2...
TUNNEL_CONTROL_PORT: int = int(os.getenv("TUNNEL_CONTROL_PORT", "9090")) # 隧道控制端口(客户端连接
TUNNEL_STREAM_PORT: int = int(os.getenv("TUNNEL_STREAM_PORT", "9091")) # 隧道流端口桥接
TUNNEL_PROXY_BASE_PORT: int = int(os.getenv("TUNNEL_PROXY_BASE_PORT", "9001")) # 代理端口起始(9001=第一台, 9002=第二台, 依次递增