Leadaxe:不做「检测到 IPv6 就自动切换」的地址族策略
对于「自动检测当前网络是否具备 IPv6 并切换」的提议,作者答复不予计划,并说明没有客户端这样做是有原因的:地址族策略是 sing-box 配置里的静态部分,改动它意味着重新生成配置并重启内核,因此「检测到 IPv6 就切换」会在每次 Wi-Fi 与蜂窝切换时断开全部连接,比它要解决的问题更糟。他也说明,若改为在内核内部每次拨号时检查默认接口是否具备全局 IPv6 地址,等于在 sing-box 之上自行定义一套语义,而这个问题在 DNS 设置里点两下即可处理。
作者原文@LeadaxeNot planned, and no client does this for a reason. The address-family strategy is a static part of the sing-box config: changing it means regenerating the config and restarting the core, so "detect IPv6 and switch" would tear down every connection on each Wi-Fi/cellular handover, which is worse than the thing it fixes. Doing it inside the core instead, by checking the default interface for a global IPv6 address at every dial, would be our own semantics on top of sing-box for a case that is two taps in DNS Settings. Closing.