mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-10 21:20:20 +08:00
新增 crate: - aether-runtime: 服务运行时基础设施(并发门控、分布式并发、指标、队列、优雅关闭、tracing) - aether-cache: 通用 TTL 缓存与命名空间抽象 - aether-data: 数据访问层(PostgreSQL/Redis 后端、repository 模式) - aether-http: HTTP 客户端封装(重试、配置) - aether-testkit: 集成测试工具集(gateway/executor/hub/proxy fixture、等待、负载测试) gateway 扩展: - 引入 audit 模块(shadow 执行审计、决策链路追踪、请求审计 bundle) - 引入 cache 模块(AuthContext 缓存、direct-plan bypass 缓存) - 引入 data 模块(auth/candidates/config/usage/video_tasks 数据访问) - 集成 ConcurrencyGate/DistributedConcurrencyGate 请求门控 - 新增本地 auth 拒绝、过载响应构建器 - 补充 control/auth_cache/video/concurrency 集成测试 aether-proxy 扩展: - AppState 集成 stream_gate / distributed_stream_gate 并发门控 - 新增 ProxyAdmissionError 及准入拒绝流程 - stream_handler 补充门控饱和/不可用场景测试 - 配置与注册客户端逻辑完善 aether-hub 扩展: - main.rs 引入运行时初始化、指标端点、健康检查 - local_relay 重构为 lib.rs 暴露公共接口
aether-hub
aether-hub 是 Tunnel Hub 服务,负责在 proxy 与 worker 之间路由帧。
已集成在Docker镜像中, 无需单独部署。
部署端指定 Hub 版本并构建
cd /path/to/Aether
./deploy.sh --hub-tag hub-v0.1.0
不指定 --hub-tag 时,./deploy.sh 会自动解析最新 hub-v* release,并在构建 app 镜像时从 GitHub Release 下载对应架构的 Hub 二进制。
build.sh 模式说明
- 默认是
binary模式(cross构建二进制)。 --upload <hub-vX.Y.Z>会把构建产物上传到 GitHub Release。- 加
--image后进入镜像模式(docker buildx,可选)。
常用参数:
--tag <tag>: 镜像 tag--image-name <name>: 镜像名(默认ghcr.io/fawney19/aether-hub)--platforms <list>: 例如linux/amd64,linux/arm64--push: 推送镜像--load: 加载到本地 Docker(单平台)--latest: 额外打latesttag
运行时参数
TUNNEL_HUB_WORKER_IDLE_TIMEOUT:worker 心跳空闲超时,默认60秒TUNNEL_HUB_OUTBOUND_QUEUE_CAPACITY:单连接出站队列容量,默认128;队列打满时会把连接视为拥塞并主动关闭,避免 Hub 内存无限增长
与部署脚本关系
./deploy.sh: 本地构建部署(会本地构建 app/base,并在构建 app 时从 GitHub Release 下载 Hub,可用--hub-tag固定版本)。