Enable fix stack for Android 7 and 9

This commit is contained in:
世界 2024-12-26 11:12:48 +08:00
parent 9c4ab0bf33
commit bc2e3960e4
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
6 changed files with 41 additions and 44 deletions

View file

@ -5,7 +5,6 @@ import (
"net/netip"
"sync"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-tun"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
@ -98,7 +97,7 @@ func (m *platformDefaultInterfaceMonitor) UnregisterCallback(element *list.Eleme
}
func (m *platformDefaultInterfaceMonitor) UpdateDefaultInterface(interfaceName string, interfaceIndex32 int32) {
if C.FixAndroidStack {
if sFixAndroidStack {
go m.updateDefaultInterface(interfaceName, interfaceIndex32)
} else {
m.updateDefaultInterface(interfaceName, interfaceIndex32)