mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
refactor(proxy-node): 移除非 tunnel 模式兼容,注册和心跳统一为 tunnel 模式
- 注册接口移除 tunnel_mode 参数,固定按 name upsert 并标记为 tunnel 模式 - 心跳接口拒绝非 tunnel 模式节点,返回升级提示 - 移除按 ip+port 查找的旧模式分支
This commit is contained in:
@@ -45,9 +45,6 @@ class ProxyNodeRegisterRequest(BaseModel):
|
||||
hardware_info: dict | None = Field(None, description="硬件信息 JSON")
|
||||
estimated_max_concurrency: int | None = Field(None, ge=0, description="估算最大并发连接数")
|
||||
|
||||
# Tunnel 模式
|
||||
tunnel_mode: bool = Field(False, description="是否使用 tunnel 模式连接")
|
||||
|
||||
@field_validator("ip")
|
||||
@classmethod
|
||||
def validate_ip(cls, v: str) -> str:
|
||||
@@ -267,7 +264,6 @@ class AdminRegisterProxyNodeAdapter(AdminApiAdapter):
|
||||
total_requests=req.total_requests,
|
||||
avg_latency_ms=req.avg_latency_ms,
|
||||
registered_by=context.user.id if context.user else None,
|
||||
tunnel_mode=req.tunnel_mode,
|
||||
)
|
||||
|
||||
context.add_audit_metadata(
|
||||
|
||||
Reference in New Issue
Block a user