mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
fix: UpdateMonitor should start when AutoDetectInterface enabled
This commit is contained in:
parent
417d709d60
commit
910f236696
|
@ -132,7 +132,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
|
|||
if options.GSOMaxSize == 0 {
|
||||
options.GSOMaxSize = 65536
|
||||
}
|
||||
if !supportRedirect || !options.AutoRoute {
|
||||
if !supportRedirect {
|
||||
options.AutoRedirect = false
|
||||
}
|
||||
tunName := options.Device
|
||||
|
@ -266,7 +266,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
|
|||
|
||||
var networkUpdateMonitor tun.NetworkUpdateMonitor
|
||||
var defaultInterfaceMonitor tun.DefaultInterfaceMonitor
|
||||
if options.AutoRoute { // don't start NetworkUpdateMonitor because netlink banned by google on Android14+
|
||||
if options.AutoRoute || options.AutoDetectInterface { // don't start NetworkUpdateMonitor because netlink banned by google on Android14+
|
||||
networkUpdateMonitor, err = tun.NewNetworkUpdateMonitor(log.SingLogger)
|
||||
if err != nil {
|
||||
err = E.Cause(err, "create NetworkUpdateMonitor")
|
||||
|
|
Loading…
Reference in New Issue
Block a user