I'm working on packet capture on iOS device with NEPacketTunnel while trying to keep the network functioning without a proxy server.
I hava viewed this thread:https://forums.developer.apple.com/message/218085#218085
Now I'm wondering how the packets to VPNServer is not looped when NEIPv4Settings.default routing all packets to vtun ?
I see that
- Traffic destined to a local network
- Traffic whose source address is bound to a specific interface
will not go via the route.
So that mean's the NEPacketTunnel encapsulated packets(or flow) has a source address bounded to a specific interface?
If so , is it possible to route raw IP packets (accessed with packetFlow.readPackets) to this specific interface to forward the traffic from the vTunto the original dest IP ? So that network is well functioning without proxy server and I have all packets captured?