Fix process search skipped for Android again

This commit is contained in:
世界
2026-04-23 05:52:14 +08:00
parent 3312b8da50
commit f102ef1d94
4 changed files with 34 additions and 5 deletions

View File

@@ -74,16 +74,19 @@ func (r *Router) searchProcessInfo(ctx context.Context, metadata *adapter.Inboun
}
func (r *Router) isLocalSource(source netip.Addr) bool {
if !source.IsValid() {
return false
}
source = source.Unmap()
if source.IsLoopback() {
return true
}
if r.platformInterface != nil {
for _, addr := range r.platformInterface.MyInterfaceAddress() {
if addr == source {
return true
}
}
}
for _, netInterface := range r.network.InterfaceFinder().Interfaces() {
for _, prefix := range netInterface.Addresses {
if prefix.Addr().Unmap() == source {
if prefix.Addr() == source {
return true
}
}