diff --git a/route/router.go b/route/router.go index 484216ee..54f3ac51 100644 --- a/route/router.go +++ b/route/router.go @@ -1121,6 +1121,9 @@ func (r *Router) AutoDetectInterfaceFunc() control.Func { if r.platformInterface != nil && r.platformInterface.UsePlatformAutoDetectInterfaceControl() { return r.platformInterface.AutoDetectInterfaceControl() } else { + if r.interfaceMonitor == nil { + return nil + } return control.BindToInterfaceFunc(r.InterfaceFinder(), func(network string, address string) (interfaceName string, interfaceIndex int, err error) { remoteAddr := M.ParseSocksaddr(address).Addr if C.IsLinux {