mirror of
https://github.com/fosrl/newt.git
synced 2026-10-08 05:39:06 +02:00
Do not capture traffic destined for internal addresses
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user