There isn't a method named 'reloadTunnel' or 'restartTunnel'.
sendProviderMessage -> handleAppMessage(doing stop then start) will get a broken TunnelExtension result.
How to implement a live configuration modification or is there an example?
Thanks
There isn't a method named 'reloadTunnel' or 'restartTunnel'.
sendProviderMessage -> handleAppMessage(doing stop then start) will get a broken TunnelExtension result.
How to implement a live configuration modification or is there an example?
Thanks
There are two reconfiguration scenarios:
From your container app
From within your tunnel provider
I’ll cover these in reverse order.
In your tunnel provider, you might receive new configuration information from the VPN server. In that case standard practice is to apply that configuration to the tunnel by calling the setTunnelNetworkSettings(_:completionHandler:) method while the tunnel is still running. If the new configuration is compatible with the old one, the interface will stay ‘up’ and clients won’t notice the change.
You can’t make persistent configuration changes from within your provider, that is, you can’t call the saveToPreferences(completionHandler:) method.
Your container app has two options:
It can send ephemeral configuration changes to the provider using the app messaging feature.
It can save persistent changes by calling the saveToPreferences(completionHandler:) method.
For this to work the provider must use key-value-observing (KVO) to watch for changes on its protocolConfiguration property. If those changes affect the tunnel’s settings, call the setTunnelNetworkSettings(_:completionHandler:) method as discussed earlier.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"