refactor: 代理节点架构重构与功能增强

aether-proxy:
- 重构 main.rs,拆分为 app/state/hardware/net 模块
- setup.rs 拆分为 setup/tui.rs + setup/service.rs,支持 systemd 服务管理子命令
- 新增 delegate 端点,支持后端通过代理节点转发请求而非传统 CONNECT 代理
- 注册时上报硬件信息(CPU/内存/fd_limit)和估算最大并发数
- 心跳上报活跃连接数,支持远程下发 node_name 配置
- HTTP 转发时剥离 X-Forwarded-* 等敏感头部
- 切换到 rustls-tls,降低日志级别减少噪音

后端:
- 从 http_client.py 提取代理相关逻辑至 proxy_node/resolver.py
- 从 routes.py 提取业务逻辑至 proxy_node/service.py
- handler 支持 delegate 模式(通过代理节点 HTTP 端点转发而非 CONNECT 隧道)
- ProxyNode 模型新增 hardware_info 和 estimated_max_concurrency 字段

前端:
- 新增 HardwareTooltip 组件展示节点硬件信息
- 远程配置支持下发 node_name
This commit is contained in:
fawney19
2026-02-08 13:33:08 +08:00
parent 254d30d32d
commit 519ad67eb1
44 changed files with 3339 additions and 1709 deletions

View File

@@ -1,6 +1,7 @@
import apiClient from './client'
export interface ProxyNodeRemoteConfig {
node_name?: string
allowed_ports?: number[]
log_level?: string
heartbeat_interval?: number
@@ -19,6 +20,9 @@ export interface ProxyNode {
proxy_url?: string
proxy_username?: string
proxy_password?: string // 脱敏后的密码
// 硬件信息aether-proxy 节点)
hardware_info: Record<string, any> | null
estimated_max_concurrency: number | null
// 远程配置aether-proxy 节点)
remote_config: ProxyNodeRemoteConfig | null
config_version: number