easy way to use VPN automatically on iOS?

Mark1a

n3wb
Joined
Aug 24, 2022
Messages
6
Reaction score
0
Location
DC
I use a VPN to get to my cameras with the BI app the trouble is on iOS ever time i have to go into settings and toggle the VPN on then open the BI app.

My router does not support openVPN, wireguard so i am stuck using l2pt.

I have read that if you use openVPN app you can have it automatically turn on when you use certain apps.

On iOS i don't think you can even use a widget toggle for the VPN.

Suggestions? besides get a new phone and router :)
 

ronoob

n3wb
Joined
May 6, 2020
Messages
13
Reaction score
5
Location
Romania, Cluj-Napoca
I have wireguard set up on my edge router 4 and wireguard iOS app has a setting to always on VPN when outside of certain wifi (i.e. when outside of my home wifi, it automatically turns on the VPN).
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
762
Reaction score
750
Yep, I use wireguard as well and and it will switch automatically. You need to take a look at your on-demand-activation settings.
 

Mark1a

n3wb
Joined
Aug 24, 2022
Messages
6
Reaction score
0
Location
DC
You need to take a look at your on-demand-activation settings.
There is none as i have to use apples built in l2pt, and my router does not support OpenVPN or wireguard.

Will openvpn or wireguard run on windows? just wonder how hard it would be to make my own VPN server as my BI PC is always on.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
276
Location
Sydney
Yep, I use wireguard as well and and it will switch automatically. You need to take a look at your on-demand-activation settings.
Not what OP means, he wants VPN to activate when the launches BlueIris only, not automatically when he leaves home, on-cellular ect.... WireGuard only has the per app activation on Android NOT iOS.
Only way I know is via Developer Options or Modern Device Management where you can enforce a VPN tunnel on an app by app basis, but not something the typical consumer can setup.
l2pt is a common standard, so the alternative is to find a VPN client that supports split-tunneling and then toggle everything off except BlueIris. Still not what OP wants, as it keeps a VPN connection open but limits what is actually sent via VPN.
This is an example of OP will likely have better security outcomes using port forwarding, rather than not having the knowledge to maintain a secure VPN configuration.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,844
Reaction score
6,424
Not what OP means, he wants VPN to activate when the launches BlueIris only, not automatically when he leaves home
You can do that using shortcuts. I'd have to look again to see if there was something else that I had to set up to do but wasn't hard in any case. Shortcuts can be a little buggy and unreliable for some things but launching when you start another app seemed to work pretty well. I was trying to do something different with some dependencies on GPS, WiFi connection, etc., and that wasn't reliable at all. It should work but it just doesn't.

I'll look when I get a chance and post the basic how to. I was doing it using OpenVPN but should work with any VPN I think.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
276
Location
Sydney

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
276
Location
Sydney
It allows for an Always On option which means we don’t toggle back and forth. It’s just on.
iOS has the (on-demand) option built-in, it's not what OP wants, he wants VPN to connect\start when they use the BlueIris App. On iOS I only know how do do that via MDM, but hopefully someone does.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,844
Reaction score
6,424
Looking more, unfortunately you can't do it the way that I did (as above) with shortcuts using the built-in L2TP. Best that I can see you can do is to set up a shortcuts automation so when the BI app is launched it also takes you to the VPN settings page. Then you could turn on or off. But not automatically.

With OpenVPN and some others you can do that next step and have it enable/disable the VPN as a step within the shortcut.

I've not tried the beta but IOS 16 will be out next month I think. Maybe they'll change things so you can then.
 

Mark1a

n3wb
Joined
Aug 24, 2022
Messages
6
Reaction score
0
Location
DC
Looking more, unfortunately you can't do it the way that I did (as above) with shortcuts using the built-in L2TP. Best that I can see you can do is to set up a shortcuts automation so when the BI app is launched it also takes you to the VPN settings page. Then you could turn on or off. But not automatically.

With OpenVPN and some others you can do that next step and have it enable/disable the VPN as a step within the shortcut.

I've not tried the beta but IOS 16 will be out next month I think. Maybe they'll change things so you can then.
The shortcuts automation have zero VPN options.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,844
Reaction score
6,424
The shortcuts automation have zero VPN options.
You need an app which exposes the enable/disable shortcut functions. For OpenVPN I used an app called Passerpartout for that. I think the shortcut part may be within the in-app purchase. Some of the other VPNs also provide apps with the same type of shortcut hooks.

If you want to do a conditional launch depending on whether the VPN is already running or not, you can get an app called Actions or Toolbox Pro which add various functions to Shortcuts. One of those is whether VPN is enabled.

A basic shortcut will look like this (4805 is the VPN profile used). But that requires that you run it. You can add it to the home screen and run that instead of tapping the BI app.


bivpn1.PNG

An automation that runs automatically when BI is launched looks like this (forum seems to want to make it huge for some reason):

bivpn2.PNG

The problem with the latter is that it leaves you in the VPN instead of BI so you have to go back to it. Seems like I had a way to call another shortcut (like that above) to avoid that without going into a loop but don't recall now how I did that. Been a while. I was trying to do something more complicated with conditionals and Shortcuts were flaky at the time.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
276
Location
Sydney
You need an app which exposes the enable/disable shortcut functions. For OpenVPN I used an app called Passerpartout for that. I think the shortcut part may be within the in-app purchase. Some of the other VPNs also provide apps with the same type of shortcut hooks.

If you want to do a conditional launch depending on whether the VPN is already running or not, you can get an app called Actions or Toolbox Pro which add various functions to Shortcuts. One of those is whether VPN is enabled.

A basic shortcut will look like this (4805 is the VPN profile used). But that requires that you run it. You can add it to the home screen and run that instead of tapping the BI app.


View attachment 137866

An automation that runs automatically when BI is launched looks like this (forum seems to want to make it huge for some reason):

View attachment 137867

The problem with the latter is that it leaves you in the VPN instead of BI so you have to go back to it. Seems like I had a way to call another shortcut (like that above) to avoid that without going into a loop but don't recall now how I did that. Been a while. I was trying to do something more complicated with conditionals and Shortcuts were flaky at the time.
Agree, looks like Shortcuts would be the way to go.
VPN Clients like Passerpartout are good as you can spectify which VPN connection to start, but I had a play with multiple VPN clients and providing they were set to automatically connect upon startup, they worked. Waited a few seconds, then launched BlueIris.
Still had to close VPN afterwards as shortcuts. OP has to work out if it's worth the bother.
VPN approach you also miss out of the rich text BlueIris notifications, and BlueIris won't be able to change profiles when you leave the house, ect.
 

codesterd

n3wb
Joined
Aug 25, 2022
Messages
1
Reaction score
0
Location
Indiana
Looking more, unfortunately, you can't do it the way that I did (as above) with shortcuts using the built-in L2TP. The best that I can see you can do is to set up a shortcuts automation so when the BI app is launched it also takes you to the VPN settings page. Then you could turn it on or off. But not automatically.

With OpenVPN and some others, you can do that next step and have it enable/disable the VPN as a step within the shortcut.

I've not tried the beta but IOS 16 will be out next month I think. Maybe they'll change things so you can then.
Shortcut limitations are probably the only reason I still keep a jailbreak after all these years. The Powercuts tweak lets you get out of the sandbox and allows you to run shell commands as well as other things in shortcuts. NotiCut is also an amazing tweak that lets you run Shortcuts from a push notification trigger from certain apps or keywords. It's great with Home Assistant.

PowerCuts Action List
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,844
Reaction score
6,424
Noticed tonight when setting up a new VPN server that the update to the OpenVPN Connect client says that it now can create the Shortcuts to enable/disable the VPN connection. If so, while it still doesn't help if using L2TP, if you wanted to set up OpenVPN, then you should be able to use that vs doing the in-app purchase in Passerpartout (though the latter still has some other nice features). I looked at it quickly but didn't see how to access the Shortcuts through it. Have to check it out again when I have some time.
 
Last edited:
Top