Packet Tunnel Provider - Change included routes

Question regarding a VPN app for MacOS (PacketTunnelProvider) -

Is it possible for users to use my VPN app, but to change the included networks that goes via the tunnel?

(I have a user that wants to exclude his local network from the tunnel)

Replies

Is it possible for users to use my VPN app, but to change the included networks that goes via the tunnel?

Yes. Your packet tunnel provider sets up the included and excluded routes via the

includedRoutes
and
excludedRoutes
properties of the NEIPv4Settings and NEIPv6Settings referenced by the NEPacketTunnelNetworkSettings.

Share and Enjoy

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

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

Thanks for the quick reply,

But if I can correct myself, I meant to ask if it's possible that the users will be able to do it with their current version, without releasing a new version from my side.


But I guess it's not possible.


PS - when I release a new version with the excludedRoutes, Is it possible to detect and exclude the local network by myself?

Or should I ask the users what is the local network address & mask..?

Is it possible to detect and exclude the local network by myself?

That depends on what you mean by “local network”. If you can come up with a concrete definition for that, I can advise you as to whether it’s possible to exclude it.

Share and Enjoy

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

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