Page 1 of 1

Q: Selective activation of VPN

Posted: 01 Oct 2013 09:22
by ikoth
Hi all,

I'm looking for an automation solution that can activate a predefined VPN session, automatically, whenever I connect to a WiFi hotspot other than my home or work networks.

Could Automagic do that?

Cheers,

I.

Re: Q: Selective activation of VPN

Posted: 01 Oct 2013 17:07
by Martin
Hi,

Automagic has no built-in actions to directly control VPN connections.
This thread discusses a possible solution by launching a shortcut to another app:
http://automagic4android.com/forum/view ... =vpn#p3205

Regards,
Martin

Re: Q: Selective activation of VPN

Posted: 01 Oct 2013 18:39
by ikoth
Thanks Martin, I'll give that a try.

Re: Q: Selective activation of VPN

Posted: 27 Aug 2017 20:27
by Juido
Martin wrote:Hi,

Automagic has no built-in actions to directly control VPN connections.
This thread discusses a possible solution by launching a shortcut to another app:
http://automagic4android.com/forum/view ... =vpn#p3205

Regards,
Martin

Since this post is from 2013, any news updates regarding this matter ?

im trying for hours to get a specific VPN connection active but no luck so far...
Secure Settings or vpncilla app doesnt work anymore.. and i wasnt able to find an alternative solution yet...

Re: Q: Selective activation of VPN

Posted: 28 Aug 2017 14:07
by Desmanto
Juido wrote: Since this post is from 2013, any news updates regarding this matter ?

im trying for hours to get a specific VPN connection active but no luck so far...
Secure Settings or vpncilla app doesnt work anymore.. and i wasnt able to find an alternative solution yet...
What kind of VPN do you use? I only use 3rd party one-click connect vpn. So far, 3rd party one need to be turn on/off by using Control UI.
But there will be UI distraction for several seconds during the switch, because we need automagic to manually open the UI, using Control UI script to turn on/off the VPN.

OpenVPN should work, however I never tried it.

Re: Q: Selective activation of VPN

Posted: 28 Aug 2017 18:52
by Juido
Desmanto wrote:
Juido wrote: What kind of VPN do you use?
atm i use a privat VPN provided by my home router, a Fritzbox 6490 and stock android build in vpn.

openvpn would work, but only works on a openvpn server.

i tried plugin method with security settings, but it doesnt work anymore on android 7, error unable to populate vpn list
same with vpncilla, it connects but there is no data flow.

i tried open shortcut, but i only get as far as the vpn settings, where i see the added connections

Re: Q: Selective activation of VPN

Posted: 29 Aug 2017 15:27
by Desmanto
So that's the limitation of openvpn. That's why some can't use it.

I don't know how your home router VPN setup. But probably it is not setup properly yet. Maybe need to change the VPN protocol, put it some key or maybe allow passthru for the VPN in the firewall.

I just try out saturn vpn free account, set it up using L2TP/IPSec. I try manually first, and it connects properly using the free username (i tried with PPTP, don't work).
(Maybe you should try this also to see if the VPN is working properly at your phone)

Then to connect it as a flow, I just launch App : com.android.settings - com.android.settings.Settings$VpnSettingsActivity
It brings me directly to VPN page, showing the saturn vpn account that I have just added.
Then I use Control UI to tap it, press the connect and looping until it shows connected. After connected, then just do whatever I want.
Example open browser and give some toast message that I am using VPN right now.

So you should try the manual first until it connects properly. After that, we can use automagic to automate it.

Re: Q: Selective activation of VPN

Posted: 30 Aug 2017 02:01
by Juido
Desmanto wrote:Then I use Control UI to tap it, to automate it.
yeah, that's how I did it too. I just hope to avoid using the control UI because of the UI distraction you mentioned. also screen had to be on and unlocked for that.

Re: Q: Selective activation of VPN

Posted: 30 Aug 2017 12:03
by Desmanto
Unfortunately there is no VPN related action, need to wait until it is implemented.
For mean time, Control UI is the best solution for built-in VPN.

I just remember there is a flow created for it already.
http://automagic4android.com/forum/view ... 39&p=18521