Do not capture traffic destined for internal addresses

This commit is contained in:
Owen
2026-09-25 10:30:39 -04:00
parent b2efd984f7
commit a9ac73b556
3 changed files with 67 additions and 0 deletions
+3
View File
@@ -139,6 +139,9 @@ func CreateNetTUNWithOptions(localAddresses, dnsServers []netip.Addr, mtu int, o
dev.hasV6 = true
}
}
// Packets to our own addresses belong to the main stack, not the proxy.
dev.proxyHandler.SetLocalAddresses(localAddresses)
if dev.hasV4 {
dev.stack.AddRoute(tcpip.Route{Destination: header.IPv4EmptySubnet, NIC: 1})
}