mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Fix process search skipped for Android again
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user