mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 13:32:41 +08:00
Fix crash on *bsd
This commit is contained in:
parent
69dc87aa6d
commit
968b9bc217
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user