Switch VPN configurations from background

Hi,

Goal:

I want to change VPN configuration when app is closed and user joins unsecure wifi. (a wifi without a password).

Possible solution.

With help of an Hotspot helper I can listen the wifi changes when app is closed and if above criteria matches, execute code. (Start a new VPN Tunnel / change VPN configuration).


Questions.

  1. Is this allowed.
  2. Can we get hotspot helper entitlement for this kind of usage.
  3. Is there other way to do this?
Can we get hotspot helper entitlement for this kind of usage.

I’m not involved in the hotspot helper approval process, so I can’t give you a definitive answer to that. However, I want to make sure you’ve read the info at the very top of the Hotspot helper documentation:

NEHotspotHelper allows your app to participate in the process of authenticating with hotspot networks, that is, Wi-Fi networks where the user must interact with the network to gain access to the wider Internet …

NEHotspotHelper is only useful for hotspot integration. There are both technical and business restrictions that prevent it from being used for other tasks

I want to change VPN configuration

Is this the configuration of a built-in VPN transport, like IKEv2? That is, are you using Personal VPN? Or is this a custom VPN transport, supported by your own Network Extension packet tunnel provider?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

This is a custom VPN transport supported by our own network extension packet tunnel provider.

So it used to filters traffic with the help of NETunnelProviderManager and NEPacketTunnelProvider. It just loops and filters the traffic locally (locally - not connected to any real remote VPN server).

Here comes the use case: While doing the filtering only “locally” we would want to change it to a remote VPN when connected to an unsafe network to provide extra safety.

(remote VPN - route the traffic to remote server)

--

Any ideas?

Switch VPN configurations from background
 
 
Q