passepartoutvpn / tunnelkit

VPN client library for Apple platforms.
GNU General Public License v3.0
3 stars 1 forks source link

Route all traffic over the tunnel, or not? #306

Closed Jdgmx closed 1 year ago

Jdgmx commented 1 year ago

This is a question more than an issue. I have a case when I need to programmatically switch between sending all network traffic through the VPN, and only send some traffic (allowing internet access). Similar to what the NEVPNProtocol.includeAllNetworks property does.

I looked for includeAllNetworks inside the tunnelkit code but it's used as a kill switch. I don't understand what a kill switch has to do with sending all network traffic over the tunnel.

My question is, what is the best way to implement this functionality? Do I have to manually override the routes before or after connecting the vpn, or is there a better way?

Thank you.

Jdgmx commented 1 year ago

Anyone?

keeshux commented 1 year ago

Have you tried disabling the current use of .includeAllNetworks to instead use the flag the way you want?