VPN icon indicating copy to clipboard operation
VPN copied to clipboard

split tunnel

Open zhiYong964941772 opened this issue 5 years ago • 1 comments

Hello, any good ideas for implementing the split tunnel for NEPacketTunnelProvider? I don't want all the traffic going through the VPN

zhiYong964941772 avatar Sep 27 '20 03:09 zhiYong964941772

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.

kean avatar Sep 27 '20 13:09 kean