Fix android routing rules about vpn protection

This commit is contained in:
Benyamin 2024-11-01 10:11:56 +08:00
parent 92c18cc7ec
commit d83fd7a59c

View file

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