Skip to content

fix(web-remote): 网卡暂时不可用时自动恢复监听 - #122

Merged
chenbstack merged 1 commit into
chenbstack:mainfrom
defia:fix/web-remote-interface-recovery
Oct 8, 2026
Merged

chenbstack merged 1 commit into
chenbstack:mainfrom
defia:fix/web-remote-interface-recovery

Conversation

@defia

@defia defia commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

变更内容 / Summary

Web Remote 绑定指定网卡时,网卡在 Wi-Fi 切换、DHCP 更新或睡眠唤醒期间暂时失去 IPv4,会触发 “Selected interface is no longer available”,同时停止网络监听,地址恢复后仍需手动开关服务。

  • 将此情况改为等待原网卡恢复,并自动重新绑定;等待期间每 5 秒补查地址,恢复后取消补查。
  • 在 0.5 秒合并窗口结束时复查地址,短暂丢失后恢复原地址不再重启健康连接;同一网卡变更 IP 时重新绑定并更新访问链接。
  • 设置页同步刷新网卡信息,保留暂时不可用的已选网卡,并增加中英文等待提示。
  • 保持所选网卡的监听范围,端口冲突仍单独报错;停止服务或切换网卡时取消旧的恢复任务。
  • 集成测试使用独立配置、可用的回环端口和内存凭证,避免干扰正在运行的 Glint。

IP 变化后,已打开的浏览器仍使用旧地址,需要从 Glint 复制新链接重新打开;端口和访问密钥保持不变。

验证方式 / Testing

  • 修改前,两项回归测试分别复现“地址恢复后无法重连”和“地址短暂消失仍重启连接”。
  • 在上游 main 575b42a 的隔离分支运行 WebRemoteServerIntegrationTests 与 WebRemoteProtocolTests:63/63 通过(Debug,arm64)。
  • 覆盖启动时不可用、运行中掉地址、无网络通知时恢复、短暂波动、停止/切换后取消恢复及端口冲突,包含真实回环 HTTP/WebSocket 请求。
  • git diff --check。
  • 尚未实际切换 Wi-Fi 或执行睡眠唤醒测试。

截图或录屏 / Screenshots or recordings

此次 UI 改动为等待提示与网卡列表状态,中英文文案已补齐;未进行人工界面验收。

关联议题 / Related issues

无。

@chenbstack
chenbstack merged commit 76a2111 into chenbstack:main Oct 8, 2026
1 check passed
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