In NEPacketTunnelProvider, we are having the full tunnel and once we are receiving the packets, we want some of the traffic redirect back to the physical adapter from tun interface.
we tried sending traffic outside the tunnel but it redirect back to the tunnel interface.
Is there a way we can redirect traffic back to physical adapter from tun interface?
what my requirement is to intercept the whole system traffic and dynamically decide whether to discard the traffic or send it to the server.
OK, then a filter — packet or otherwise — is not going to help because it can only allow or deny traffic.
Is there a way we can convert layer 4 packet to layer 3?
No. Well, yes, but it’s a bunch of code. I’ve seen folks embed an entire TCP/IP stack in their provider (for example, lwIP) but that’s not a lot of fun.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"