It is possible to send some packets directly to network when VPN is connected?

For example, I use NEPacketTunnelProvider. When VPN is connected I want to send packet not via my custom VPN but directly to unsequred network (UDP packets or special destination adress). And also can I get data from unsequred network not from VPN connection?


Thank you

Are you developing the packet tunnel provider? If so, are you trying to do this work from within the packet tunnel provider? Or just from some app?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Yes, I make custom VPN with packet tunnel provider. And I want to get packet from TUN, check that on my rules and send them (if packets don't apply to my rules) not to VPN but to Internet

So you’re doing this from within the provider? If so, that shouldn’t be a problem. The system has extensive infrastructure to prevent packet loops, that is, to ensure that traffic generated by the provider never goes via provider’s tunnel.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
I did not see this thread, asked the same question here - https://developer.apple.com/forums/thread/677180

So @kit228, do you see any loops ?
It is possible to send some packets directly to network when VPN is connected?
 
 
Q