Is there any way to get iOS shortcuts to enable or disable a VPN connection?

hello everybody

Is there any way to get iOS shortcuts to enable or disable a VPN connection?

I have sme app are blocked in Country so I want Automation in shortcut when i enter the app the vpn direct open and when close the app the vpn will close

NordVPN has good shortcuts. If you’re not interested in the provider, there’s an OpenVPN client called Passepartout, and it has really good shortcut integration.

You can search vpn here to find which apps supports shortcuts.

The OpenVPN does provide a pretty easy way to enable/disable a VPN with a simple toggle. While there is a easily way to enable/disable a VPN within the app, allowing this feature in the shortcuts app give users the ability to automate it. use widevpn ,support openvpn and wireguard.

Not possible AFAIK unless the app provides an integration or URL scheme, I think 1.1.1.1 does.

Windscribe has an action to connect to vpn. However you can’t disconnect automatically afaik

If you go into the specific connection you want to connect to you can set a
shortcut to connect to that specific configuration, but it looks like you need another separate shortcut to disconnect. Can’t be a toggle like setup.

I have same request with an alteration.
I want to set a shortcut for turning on/off VPN trough iOS settings

Hey! Does anyone now an iOS app to add my own vpn server? All apps as Windscribe, nordvpn offering only there own servers.
I tried to raise the shadowsocks peotocol, but have issues with the connection, so not a option for me, but iOS app Shadowrocket is awesome with possibilities for creating a shortcut actions

For those looking for an app or so. There isnt really a need to. Just go to short cuts and search “vpn” and u shld see this widget or bar “Set VPN”. Click on it and choose which VPN you want to connect to. To disconnect u can just click on connect and select disconnect. It should be very straightforward. Hope it helps.

Thanks for calling out passepartput— I am here looking for the same solution and this looks great

Commenting on a 2yr old post just to say THANK YOU for mentioning Passepartout - you saved my day!

With open vpn the behavior is weird. I create an automation in shortcuts. Eg if I open instagram, OpenVPN connect, and it even works, but when connected and you open instagram, I am automatically sent to the open vpn app, and this is the circle, I am always kicked from insta to OpenVPN even its already connected

How do I set it up for wireguard?

I don’t understand how you do that in shortcuts, can you explain ?

I dont see vpn when i search it

Super helpful! Thanks!

free code:
KEZX9-WRV5K-NEYF2-6XMHU

It is possible via open Wireguard if IP is not VPN. Let me know if you still need this info. I will share screenshots with you

On your iPhone, in the OpenVPN app, go to “Edit” on the connection (the pencil icon) and at the bottom you should see “Add Shortcut To Siri” and that will add a shortcut in the shortcuts app, which you can add to the Home Screen or add additional steps to.