Shortcut to toggle VPN on or off?

Shortcuts doesn’t have a native VPN action, wondering if anyone has been able to put one together for toggling VPN on or off? Closest I can get is use the pref pane action for settings app to go to the VPN but that’s it. Ideally I could just do it behind the scenes.

Are you using a commercial VPN or your own?

EncryptMe just released shortcuts support for on/off.

If you’re using OpenVPN, Passepartout has Shortcuts support, although it seems to always bounce you into the app.

1 Like

Any recommendable third party client with Shortcuts integration for L2TP/IPsec?

ExpressVPN has an x-callback-url scheme that gets activated by expressvpn://, but I cannot figure out how to tell the app to connect to VPN. (On macOS, it was pretty easy to get it to connect by sending a connect command via AppleScript.) I tried chatting online with an ExpressVPN support rep, but they will not share their x-callback-url API for their iOS app.

All of these apps and services, ExpressVPN included, simply set up a VPN profile that is visible within the iOS Settings app. If you go to this app, you can see that one VPN profile has a checkmark and is considered to be the default profile. Toggling the switch to turn VPN on/off would be an easy implementation within Shortcuts. This can already be done for turning on/off WiFi or Bluetooth, but equivalent functionality for VPN seems to be missing from Shortcuts and even Siri itself. Case in point: if you ask Siri, “Turn on WiFi,” the command will work. If you ask Siri, “Turn on VPN,” then Siri responds, “Sorry, but I’m not able to change that setting.”

I think we have to wait for Apple to expose the VPN toggle switch.

It would be a great feature to have. I would set up a shortcut that detects when I am on any WiFi network besides home and work, and then would immediately connect to VPN in those circumstances. Would be great!

1 Like