Skip to content

[Bug][macOS] Virtual DNS 10.20.0.2 becomes unreachable after upgrading to 1.2.24.2709 #1934

Description

@BowieY

环境

  • macOS 26.6.2,Apple Silicon
  • 异常版本:Karing 1.2.24.2709
  • 正常版本:Karing 1.2.23.2606,回退并重启后验证
  • TUN:开启,网络栈 mixed,自动路由开启
  • 自定义 route_exclude_address:空
  • Wi-Fi DNS:8.8.8.8

问题现象

升级后,系统默认 DNS 为 Karing 的 10.20.0.2,但系统出现将其所在网段排除到物理接口的路由:

10.20.0.0/30 → 本地路由器 → en0

执行以下命令,显示接口为 en0,而非 Karing 的 utun4:

route -n get 10.20.0.2

以下 DNS 查询超时:

dig @10.20.0.2 api.push.apple.com A +time=5 +tries=1
connection timed out; no servers could be reached

对照验证

  1. 将同一 DNS 请求的 UDP socket 显式绑定 utun4 后,解析成功。

  2. 添加以下临时主机路由后,普通 DNS 查询恢复:

    sudo route -n add -host 10.20.0.2 -interface utun4
  3. 删除本次添加的临时路由后,查询再次超时。

  4. 回退至 1.2.23.2606 后,确认主程序及正在运行的 VPN 系统扩展均已回退。VPN 动态配置不再声明该网段的 ExcludedRoutes,但系统路由表仍保留原有的 /30 → en0 路由,查询仍失败。此时新版扩展状态为 terminated waiting to uninstall on reboot。

  5. 重启 macOS 后,新版扩展已移除,错误的 /30 路由消失,10.20.0.2 自动经过 utun4。相同 dig 查询返回 NOERROR,无需手动添加路由。

预期行为

Karing 注册为系统 DNS 的虚拟地址应通过 TUN 正常访问,不应被排除到物理接口。VPN 扩展停止或替换时,也应正确清理其添加的路由。

可能相关的变更

1.2.24.2705 的发布说明提到调整 route_exclude_address,关联 #1889。该问题涉及 Windows 虚拟网关回环及排除 10.20.0.0/30。

尚未确认是否同因,请帮助检查:

  • 排除 TUN 网段的逻辑是否在 macOS 上影响了虚拟 DNS?
  • VPN 扩展停止或替换时,是否遗漏清理排除路由?

以上是实测现象;与 #1889 的因果关系仍需进一步确认。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions