mirror of
https://github.com/netbirdio/ios-client.git
synced 2026-09-23 09:28:33 -07:00
The previous diagnostics proved the Swift side asks for the right thing on
deselect (containsDefaultRoute flips to false, the payload drops ::/0, the
apply reports OK) yet IPv6 stays dead. What it could not show is what the
system did with that request, so this adds a read-back of the actual state.
TunnelStateProbe reports, per snapshot:
- interface addresses and UP/DOWN for utun*/en*/pdp_ip*/ipsec*
- the kernel routing table via sysctl(NET_RT_DUMP) for both families, with
default routes listed first and RTF_BLACKHOLE/REJECT/IFSCOPE flags
- a non-blocking TCP connect to [2606:4700:4700::1111]:443, the programmatic
equivalent of the Safari step, distinguishing connected / soerr / timeout
Snapshots are taken before every apply, and after a successful one both
immediately and 3s later, so a delayed route teardown is visible rather than
being mistaken for a permanent one.
Also logs the previously invisible parts of the chain so one run covers it
end to end: the raw prefix string from Go and the parsed result in
onNetworkChanged (including the dropped-callback and skipped-setRoutes
paths), setInterfaceIP/setInterfaceIPv6, setRoutes with the old and new
containsDefault, setDNS, which caller triggered updateTunnel, and the
select/deselectRoute entry points with a snapshot before each.
Diagnostics only, not for merge.