generate-mobileconfig: Disconnect from VPN while connected to local network #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows to supply a optional EXCLUDE_SSID environment variable when generating the mobileconfig file. If set, the device will disconnect from VPN while connected to the specified WiFi SSID. This is useful when you are at home and your device is connected to the local network. Still being connected to the VPN that tunnels to your local network anyway makes no sense and lowers your connection speed. As soon as you disconnect from the specified SSID, the VPN connection will be established again.
If no EXCLUDE_SSID is provided, the profile behaves as before.
The mobileconfig-parts are taken from a profile generated using the Apple Configurator 2 and tested on macOS 10.12, iOS 10 and iOS 11 PB 2 but should also work on previous releases since IKEv2 is supported.