mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 09:50:21 +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:
23
aether-hub/Cargo.toml
Normal file
23
aether-hub/Cargo.toml
Normal file
@@ -0,0 +1,23 @@
|
||||
[package]
|
||||
name = "aether-hub"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Tunnel Hub for Aether - frame router between workers and proxies"
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
axum = { version = "0.8", features = ["ws"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
clap = { version = "4", features = ["derive", "env"] }
|
||||
dashmap = "6"
|
||||
parking_lot = "0.12"
|
||||
flate2 = "1"
|
||||
futures-util = "0.3"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
strip = true
|
||||
codegen-units = 1
|
||||
Reference in New Issue
Block a user