Fix lint errors

This commit is contained in:
世界
2026-05-13 22:37:05 +08:00
parent 429182a349
commit a47f39fa2b
79 changed files with 219 additions and 667 deletions

View File

@@ -3,6 +3,7 @@ package route
import (
"context"
"net/netip"
"slices"
"strings"
"github.com/sagernet/sing-box/adapter"
@@ -78,10 +79,8 @@ func (r *Router) isLocalSource(source netip.Addr) bool {
return true
}
if r.platformInterface != nil {
for _, addr := range r.platformInterface.MyInterfaceAddress() {
if addr == source {
return true
}
if slices.Contains(r.platformInterface.MyInterfaceAddress(), source) {
return true
}
}
for _, netInterface := range r.network.InterfaceFinder().Interfaces() {