VPN
VPN copied to clipboard
split tunnel
Hello, any good ideas for implementing the split tunnel for NEPacketTunnelProvider? I don't want all the traffic going through the VPN
There used to be an approach where you would set up split VPN tunnel the following way:
- Come out with a fake DNS address
- Configure a tunnel to use these fake DNS addresses
- Configure a tunnel to only route traffic to these fake DNS addresses
- Use NEPacketTunnelProvider to inspect and send DNS traffic anywhere you want
https://github.com/AdguardTeam/AdguardForiOS is or at least was one of the apps using this approach, you might want to check their codebase.
However, I don't know if that is an intended usage of NEPacketTunnelProvider. There might have been some change to review policies to not allow this kind if usage. I would suggest to look into it.