Fix android routing rules about vpn protection

This commit is contained in:
Benyamin 2024-11-13 10:27:26 +08:00 committed by 世界
parent b8b3759826
commit 8a18f0c99e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -592,6 +592,7 @@ func (t *NativeTun) rules() []*netlink.Rule {
it = netlink.NewRule() it = netlink.NewRule()
if t.options.InterfaceMonitor.OverrideAndroidVPN() { if t.options.InterfaceMonitor.OverrideAndroidVPN() {
it.Mark = protectedFromVPN it.Mark = protectedFromVPN
it.MarkSet = true
} }
it.Mask = protectedFromVPN it.Mask = protectedFromVPN
it.Priority = priority it.Priority = priority
@ -604,6 +605,7 @@ func (t *NativeTun) rules() []*netlink.Rule {
it = netlink.NewRule() it = netlink.NewRule()
if t.options.InterfaceMonitor.OverrideAndroidVPN() { if t.options.InterfaceMonitor.OverrideAndroidVPN() {
it.Mark = protectedFromVPN it.Mark = protectedFromVPN
it.MarkSet = true
} }
it.Mask = protectedFromVPN it.Mask = protectedFromVPN
it.Family = unix.AF_INET6 it.Family = unix.AF_INET6