fix(tunnel): client 加心跳看门狗,半死链路 75s 主动重连

Mac 睡眠/切网后 TCP 半死,close 事件永远不来,client 会一直停在「已连接」而服务端早已踢掉。
新增:记录最近收帧时间,75s(连丢 3 个 25s 心跳)无任何帧即 terminate 走既有重连。
顺带把 client 日志时间从 UTC 改为东八区。
This commit is contained in:
2026-11-17 15:01:54 +08:00
parent af0575dddd
commit 6a0aed2611
2 changed files with 20 additions and 4 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ services:
- `name`:固定端口路由用的服务标识(有域名时可省略)
- `host`:`域名` / `*.example.com` / `"*"`(兜底)
- `userAgent`:可选,握手时伪装浏览器 UA,降低被 DPI 盯上的概率
- 断线自动重连,启动时自检每个端口可达性(不可达只告警不退出)
- 断线自动重连(含半死链路:75 秒收不到任何帧即主动断开重连),启动时自检每个端口可达性(不可达只告警不退出)
## 隧道协议