From 89ff9f8368179fec8f62e8c0e7c68f2fbf597c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 8 Oct 2022 16:48:30 +0800 Subject: [PATCH] Fix interface monitor --- route/router.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/route/router.go b/route/router.go index e51085b3..f0814e12 100644 --- a/route/router.go +++ b/route/router.go @@ -243,10 +243,9 @@ func NewRouter(ctx context.Context, logger log.ContextLogger, dnsLogger log.Cont router.transportMap = transportMap router.transportDomainStrategy = transportDomainStrategy - needInterfaceMonitor := options.AutoDetectInterface || - C.IsDarwin && common.Any(inbounds, func(inbound option.Inbound) bool { - return inbound.HTTPOptions.SetSystemProxy || inbound.MixedOptions.SetSystemProxy || C.IsAndroid && inbound.TunOptions.AutoRoute - }) + needInterfaceMonitor := options.AutoDetectInterface || common.Any(inbounds, func(inbound option.Inbound) bool { + return inbound.HTTPOptions.SetSystemProxy || inbound.MixedOptions.SetSystemProxy || inbound.TunOptions.AutoRoute + }) if needInterfaceMonitor { networkMonitor, err := tun.NewNetworkUpdateMonitor(router)