IPv6 Dual-Stack Bypass Leaks: macOS, Windows & Client Fixes
IPv6 双栈旁路泄漏是什么?macOS、Windows 与代理客户端关闭指南
Most home fiber and mobile networks now assign both an IPv4 and a global IPv6 address. If your VPN or proxy only tunnels IPv4, dual-stack websites (Google, Cloudflare, AI APIs) can connect straight over your local IPv6 address via Happy Eyeballs (RFC 8305), exposing your real ISP and city.
现在绝大多数家庭宽带和手机网络都默认分配了公网 IPv6。如果你的 VPN 或代理只接管了 IPv4,浏览器访问支持双栈的网站(Google、Cloudflare、各大 AI 平台)时,会按 RFC 8305 优先走更快的本地直连 IPv6,把你的真实地区和运营商直接漏出去。
Your IPv4 check looks clean, yet a dual-stack test detects a global 240e:: / 2409:: / 2600:: IPv6 address belonging to your local broadband carrier.
查 IPv4 一切正常,但在双栈检测里却冒出了一串归属本地宽带的公网 IPv6 地址(如 240e:: / 2409:: 开头)。
Diagnostic Breakdown (Scene → Risk → Fix)
核心排查对照表(场景 → 风险 → 解法)
| Platform | Cleanest Fix | Reversible? |
|---|---|---|
| Proxy Client (Clash / Sing-box) | Set ipv6: false in config or tunnel ::/0 through proxy | Yes — 1 line in config |
| macOS | System Settings -> Network -> Wi-Fi -> Details -> TCP/IP -> Link-local only | Yes — keeps AirDrop working |
| Windows 10 / 11 | ncpa.cpl -> Adapter Properties -> Uncheck Internet Protocol Version 6 | Yes — 1 checkbox |
| 系统 / 环境 | 最稳妥的处理方式 | 是否可随时恢复 |
|---|---|---|
| 代理客户端(Clash / Sing-box) | 配置里设 ipv6: false,或把 ::/0 纳入代理接管 | 随时可改,改一行即可 |
| macOS | 系统设置 → 网络 → Wi-Fi → 详细信息 → TCP/IP → 改为「仅限本地链路」 | 随时切回「自动」,不影响隔空投送 |
| Windows 10 / 11 | Win+R 输入 ncpa.cpl → 网卡属性 → 取消勾选 TCP/IPv6 | 随时可重新勾选 |
Actionable Commands & Setup
分系统实操命令与设置
networksetup -setv6linklocal "Wi-Fi"
1. Why Link-Local Only Is Better Than Fully Killing IPv6 on macOS
一、为什么 macOS 推荐选「仅限本地链路」而不是彻底禁用
Setting macOS IPv6 to "Link-local only" stops all external internet IPv6 routing while preserving local fe80:: discovery so AirDrop, AirPlay, and local printers keep working smoothly.
把 macOS 设为「仅限本地链路(Link-local only)」会截断所有外网公网 IPv6 出口,但保留局域网内的 fe80:: 通信,这样隔空投送(AirDrop)和局域网打印机不受任何影响。
2. Re-Test After Changing
二、改完立刻复测
Refresh /leak-test/ after toggling IPv6 and verify Card 3 displays "No IPv6 leak (IPv4 only)".
改完设置后刷新 /leak-test/,确认第 3 张卡片的 IPv6 出口检测变成「无 IPv6 泄漏(仅 IPv4)」即可。
Frequently Asked Questions
常见疑问
Is IPv6 itself unsafe?
No. IPv6 is completely normal on direct connections; it only becomes a privacy leak when your VPN tunnels IPv4 while leaving IPv6 unproxied.
IPv6 本身不安全吗?
不是。日常直连开 IPv6 没有任何问题;只有在挂了仅支持 IPv4 的代理时,未接管的 IPv6 才会变成绕过隧道的漏洞。