Skip to content

fix: 防止面板 API 异常时节点反复重启#21

Closed
lcy0828 wants to merge 1 commit intoperfect-panel:masterfrom
lcy0828:fix/reload-storm-on-api-failures
Closed

fix: 防止面板 API 异常时节点反复重启#21
lcy0828 wants to merge 1 commit intoperfect-panel:masterfrom
lcy0828:fix/reload-storm-on-api-failures

Conversation

@lcy0828
Copy link
Copy Markdown

@lcy0828 lcy0828 commented Apr 27, 2026

变更说明

修复面板 API 不稳定时节点反复 reload / Xray 反复重启的问题。

当面板接口出现 timeout、connection reset、Cloudflare 521/522 等临时异常时,旧逻辑可能把任务超时或非语义配置差异当成需要重启的信号,导致节点短时间内连续重启。

主要改动

  • 服务端配置变更判断从原始响应 body hash 改为语义 hash。
  • 规范化非语义顺序差异,例如 block 规则、protocols、DNS domains、outbound rules。
  • 移除任务超时触发 reload 的逻辑,避免 API 异常导致重启风暴。
  • 增加 reload 防抖,避免短时间内重复重启。
  • 关闭任务时增加 context cancel 和 wait,避免任务 goroutine 残留。
  • API 错误日志脱敏 secret_key
  • 修复错误日志里 API URL 显示异常的问题。
  • 增加服务端配置语义 hash 的单元测试。

@wyx2685 wyx2685 closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants