From 10f4d5375a583c4aa035da1dcf1603381623fef8 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Tue, 1 Aug 2023 22:14:11 +0800 Subject: [PATCH] Fix: should Unmap ip after AddrFromSlice --- tunnel/tunnel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 72da03d..bde4cba 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -404,6 +404,7 @@ func match(metadata *C.Metadata) (C.Proxy, C.Rule, error) { srcIP, ok := netip.AddrFromSlice(metadata.SrcIP) srcPort, err := strconv.ParseUint(metadata.SrcPort, 10, 16) if ok && err == nil && metadata.OriginDst.IsValid() { + srcIP = srcIP.Unmap() path, err := P.FindProcessPath(metadata.NetWork.String(), netip.AddrPortFrom(srcIP, uint16(srcPort)), metadata.OriginDst) if err != nil { log.Debugln("[Process] find process %s: %v", metadata.String(), err)