mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
feat(proxy): 支持远程推送升级与proxy元数据上报
- aether-proxy 注册和心跳时上报 proxy_metadata(含版本号) - 心跳 ACK 支持 upgrade_to 字段,proxy 收到后自动执行升级 - 重构 upgrade 逻辑,新增 perform_upgrade 用于远程触发的自动升级 - stream_handler 延迟统计改为仅记录连接建立延迟(DNS+TCP/TLS+TTFB) - 后端新增 proxy_metadata 数据库字段和批量升级 API - 远程配置支持下发 upgrade_to 版本指令 - 前端展示节点版本号,支持单节点和批量升级操作
This commit is contained in:
@@ -20,6 +20,8 @@ struct RegisterRequest {
|
||||
hardware_info: Option<serde_json::Value>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
estimated_max_concurrency: Option<u64>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
proxy_metadata: Option<serde_json::Value>,
|
||||
tunnel_mode: bool,
|
||||
}
|
||||
|
||||
@@ -107,6 +109,9 @@ impl AetherClient {
|
||||
heartbeat_interval: config.heartbeat_interval,
|
||||
hardware_info: hw.and_then(|h| serde_json::to_value(h).ok()),
|
||||
estimated_max_concurrency: hw.map(|h| h.estimated_max_concurrency),
|
||||
proxy_metadata: Some(serde_json::json!({
|
||||
"version": env!("CARGO_PKG_VERSION"),
|
||||
})),
|
||||
tunnel_mode: true,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user