Tasker VPN on/off

980 views
Skip to first unread message

Raivo Kask

unread,
May 31, 2016, 10:16:04 AM5/31/16
to Tasker
I have Samsung Galaxy S7 edge (Android 6.0.1) and have installed OpenVPN Connect.
The VPN works fine towards my VPN servers.
Now I want to dis/reconnect when I enter/leave my home network.
How can that be done seamlessly ?

Eric Kruis

unread,
Jun 8, 2016, 7:45:34 AM6/8/16
to Tasker
You have to make a profile to detect you're home (e.g. connected to home Wifi, or based on location).
Then execute a Send Intent action. Use the following entries with the Send Intent to start the Open VPN connection:
Action: android.intent.action.VIEW
Cat: none
Extra: the name of the OVPN profile you want to use
Package: net.openvpn.openvpn
Class: net.openvpn.openvpn.OpenVPNClient
Target: Activity
You can leave other entries empty.

To stop the connection: same as above, except:
Leave Extra empty
Class: net.openvpn.openvpn.OpenVPNDisconnect

I use it to start OpenVPN automatically when connected to public hotspots I use on a regular base that are not all that secure (or block my secure imap mail).

Raivo Kask

unread,
Jun 8, 2016, 8:26:10 AM6/8/16
to tas...@googlegroups.com
Thanks Eric - but I use open source OpenVPN for Android ...
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/pYkycir2P48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Raivo Kask

unread,
Jun 8, 2016, 8:27:52 AM6/8/16
to Tasker
Thanks Eric - but I use open source OpenVPN for Android ...

Eric Kruis

unread,
Jun 8, 2016, 8:47:39 AM6/8/16
to Tasker
I use this app: https://play.google.com/store/apps/details?id=net.openvpn.openvpn . That works with the task I described.

Raivo Kask

unread,
Jun 8, 2016, 9:18:42 AM6/8/16
to Tasker
Yes - I am familiarly with OpenVPN Connect - but it is a proprietary software and not open source ...
Reply all
Reply to author
Forward
0 new messages