mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
feat(tunnel): 引入 aether-hub 帧路由器,支持多 worker 共享 tunnel 连接
新增 Rust 实现的 aether-hub 服务,作为 Docker 容器内部 WebSocket 帧路由器, 解决多 Gunicorn worker 进程间 tunnel 连接隔离问题。 主要改动: - 新增 aether-hub Rust 项目,实现 proxy/worker 双向帧路由与 stream_id 重映射 - 新增 HubConnectionManager/HubTunnelTransport,worker 通过 Hub 转发 tunnel 帧 - 新增 create_tunnel_transport 工厂函数,按运行环境自动选择 Hub 或直连模式 - 新增 NODE_STATUS 广播机制,Hub 实时通知所有 worker 节点连接状态变化 - CI/CD 新增 build-hub job,Dockerfile 集成 Hub 二进制,deploy.sh 适配 Hub 构建 - 默认 GUNICORN_WORKERS 从 4 降为 2
This commit is contained in:
12
.env.example
12
.env.example
@@ -32,9 +32,15 @@ ADMIN_PASSWORD=admin123456
|
||||
# 应用端口(默认 8084)
|
||||
# APP_PORT=8084
|
||||
|
||||
# Gunicorn Worker 数量(默认 4)
|
||||
# 建议最小设置为 2
|
||||
# GUNICORN_WORKERS=4
|
||||
# Gunicorn Worker 数量(默认 2)
|
||||
# Docker 部署下 Tunnel Hub 为容器内部固定服务,可安全使用多 worker。
|
||||
# 非 Docker 运行时若使用 ProxyNode tunnel,建议设置为 1。
|
||||
# GUNICORN_WORKERS=2
|
||||
|
||||
# 本地构建 app 镜像时使用的 Hub 二进制镜像
|
||||
# 默认 aether-hub:local(需先本地构建 aether-hub/Dockerfile)
|
||||
# 也可改为 ghcr.io/fawney19/aether-hub:latest
|
||||
# HUB_BINARY_IMAGE=aether-hub:local
|
||||
|
||||
# Gunicorn Max Requests(默认 4000)
|
||||
# Worker 处理指定数量请求后自动重启,防止内存泄漏
|
||||
|
||||
Reference in New Issue
Block a user