OpenVPN

Post your questions and help other users.

Moderator: Martin

Post Reply
Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

OpenVPN

Post by Wibbly » 26 Jan 2018 09:31

I think I read somewhere that Oreo no longer supports launching shortcuts created from another app which is why I can no longer select a shortcut created by OpenVPN to be launched via Automatic. But it seems I can fire up OpenVPN via an intent as below.

https://forums.openvpn.net/viewtopic.php?t=13122

But I can't seem to get the suggestion above to work in Automagic's send broadcast action. How exacly should I be setting up the fields in this action to try and make it work?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: OpenVPN

Post by Desmanto » 26 Jan 2018 11:12

Do you mean you can't capture OpenVPN shortcut just like in this thread?
viewtopic.php?f=6&t=6971

Make sure you use Action Start Activity. But try also with Start service and Send broadcast too. I remember there is restriction of broadcast too in Oreo. You can specify explicit component packagename, but you must leave the class name blank.

From your link, most of the fields are self-explained. Except the extra, you should put it like

Code: Select all

putString("net.openvpn.openvpn.AUTOSTART_PROFILE_NAME", "example.com/autologin")
Unfortunately I don't use OpenVPN, so can't try it out.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: OpenVPN

Post by Wibbly » 31 Jan 2018 18:03

Thanks, Action Start Activity did the trick and there's even OpenVPN there as an example. :-) [and you don;t need '.../openvpn' at the end of the string

Pistolero
Posts: 6
Joined: 22 Aug 2018 14:34

Re: OpenVPN

Post by Pistolero » 22 Aug 2018 23:09

Hi Desmanto!

Hope this finds you well, dear sir.

I desperately need your help with the correct syntax for the EXTRA values as delineated in the official OpenVPN FAQ: https://docs.openvpn.net/connecting/con ... or_Android

Code: Select all

1. CONNECT

a) Access Server module
Action: net.openvpn.openvpn.CONNECT
OR
Action: android.intent.action.VIEW
Cat: None
Mime Type: {blank}
Data: {blank}
Extra: net.openvpn.openvpn.AUTOSTART_PROFILE_NAME:AS {your_profile_name}
Extra: net.openvpn.openvpn.AUTOCONNECT:true
Extra: net.openvpn.openvpn.APP_SECTION:AS
Package: net.openvpn.openvpn
Class: net.openvpn.unified.MainActivity
Target: Activity

b) OVPN Profile module
Action: net.openvpn.openvpn.CONNECT
OR
Action: android.intent.action.VIEW
Cat: None
Mime Type: {blank}
Data: {blank}
Extra: net.openvpn.openvpn.AUTOSTART_PROFILE_NAME:PC {your_profile_name}
Extra: net.openvpn.openvpn.AUTOCONNECT:true
Extra: net.openvpn.openvpn.APP_SECTION:PC
Package: net.openvpn.openvpn
Class: net.openvpn.unified.MainActivity
Target: Activity

2. DISCONNECT
Action: net.openvpn.openvpn.DISCONNECT
Cat: None
Mime Type: {blank}
Data: {blank}
Extra: net.openvpn.openvpn.STOP:true
Extra: {blank}
Extra: {blank}
Package: net.openvpn.openvpn
Class: net.openvpn.unified.MainActivity
Target: Activity
Could you please assist in translating these commands to Automagicallese? :P

BTW, I use the OVPN Profile module.

Mil gracias!

Francisco.

Post Reply