kean / VPN

Sample custom VPN client/server in Swift
184 stars 45 forks source link

split tunnel #2

Open zhiYong964941772 opened 4 years ago

zhiYong964941772 commented 4 years ago

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

kean commented 4 years ago

There used to be an approach where you would set up split VPN tunnel the following way:

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.