Always On VPN

16 views
Skip to first unread message

Michael

unread,
Sep 9, 2022, 10:20:36 AMSep 9
to Tasker
I have found a few posts about this, but nothing recent. I would like to be able to turn Always-On VPN for OpenVPN on and off with Tasker. 

The closest I found was this https://www.reddit.com/r/tasker/comments/dlfsbu/alwaysonvpn_toggle_with_tasker/ which mentions "always_on_vpn_app" in the "Secure" section of Custom Settings. I went there and I found "always_on_vpn_lockdown" and " always_on_vpn_lockdown" but no "always_on_vpn_app".

Is this setting still a thing? If so, how is the proper way to use it? As I said, that reddit thread didn't seem to be able to get it to work either.

Is there a better way to do this now?

Thanks!

Michael

unread,
Sep 9, 2022, 10:57:12 AMSep 9
to Tasker
Bit of an update: I installed SetEdit (Settings Database Editor) and confirmed that there doesn't appear to be a "always_on_vpn_app" setting in the Secure section there either.

But here's where it gets weird. If I use tasker to READ the setting into a variable and I enable Use Root, I get the current value. IE if I set up OpenVPN Always-On through the regular Android settings, then get the setting, I correctly get "net.openvpn.openvpn". If I turn off Always-On and get the value its "null". Note that this only works with Use Root, if I try without, I just get blank as the value. But I have tried setting the value using Use Root, and there's no error, but it also doesn't apply the change. If I go into the Android settings, it's still turned off. If I retrieve the value though, it will be what I set it to (until I change it in Android Settings again).

So the value is there, but it is also somehow not there. And it works, but yet it also doesn't. Go figure. Anyway, wanted to add that additional information.

One last thing, I can set "always_on_vpn_lockdown" just fine. That works perfectly. And it shows up in SetEdit too.

Thanks in advance for any help, I'd really like to get this working!

Reply all
Reply to author
Forward
0 new messages