Fix process search skipped for TUN

This commit is contained in:
世界
2026-04-21 15:23:05 +08:00
parent d942ecc904
commit 71f6a2ab4e
3 changed files with 11 additions and 4 deletions

View File

@@ -40,9 +40,13 @@ func NewNetworkInterfaceAddressItem(networkManager adapter.NetworkManager, inter
func (r *NetworkInterfaceAddressItem) Match(metadata *adapter.InboundContext) bool {
interfaces := r.networkManager.NetworkInterfaces()
myInterface := r.networkManager.InterfaceMonitor().MyInterface()
match:
for ifType, addresses := range r.interfaceAddresses {
for _, networkInterface := range interfaces {
if networkInterface.Name == myInterface {
continue
}
if networkInterface.Type != ifType {
continue
}