vpnhide/data
Danila Gornushko 0d6ecf9969
fix(iface): exclude ipip/gre fallback netdevs from VPN matching (#356)
* fix(iface): exclude ipip/gre fallback netdevs from VPN matching

The `tun` and `gre` name-prefix rules in data/interfaces.toml matched the
kernel's own fallback tunnel devices — tunl0 (ipip), gre0 and gretap0
(ip_gre) — which are auto-created at index 0 when those modules load and
are not user VPNs. Treating them as VPN interfaces made every backend hide
them from target apps and deny SO_BINDTODEVICE/SO_BINDTOIFINDEX to them;
the resulting "interface exists but is absent from enumeration" is also a
fingerprint. Real-world impact is limited (matching is per-UID and the
fallback devices carry no traffic), so no changelog fragment — but it is
still incorrect and worth fixing.

The match grammar had no way to express "match X but not Y", so add an
[[exclude]] section evaluated before the [[vpn]] rules in all four
generated matchers (kmod C, zygisk Rust, checks Rust, lsposed Kotlin).
Exclude the `tunl` prefix and the exact names gre0 / gretap0, so
user-created tunnels (tun0, gre1, gretap1, ...) stay hidden.

Regenerated every matcher and its tests via scripts/codegen-interfaces.py.
Host vectors updated accordingly (56 C vectors pass; Rust + Kotlin vector
tests pass).

* fix(iface): limit fallback exclusion to exact tunl0 name
2026-10-12 15:09:10 +03:00
..
hooks.toml refactor(builtin): rename the in-tree backend kpatch -> builtin 2026-09-01 20:30:35 +03:00
interfaces.toml fix(iface): exclude ipip/gre fallback netdevs from VPN matching (#356) 2026-10-12 15:09:10 +03:00