Skip to main content

How Do I Use Tasker with OpenVPN Connect for Android?

Abstract

Use Tasker with OpenVPN Connect for Android.

Use the steps here to configure Tasker with the OpenVPN Connect app for Android 3.3.2 and newer.

Note

The Profile_ID mentioned in the Connect Action below is defined during the import process—it doesn't change even if you change your profile's name after the import procedure has concluded.

Tasker can launch VPN connections autonomously when a profile doesn't require additional authorization steps or the user has previously saved connectivity credentials for the profile in Connect. Otherwise, the user is prompted to authenticate manually.

Tasker can control the following Actions:

  • Connect VPN (with specified profile).

  • Disconnect VPN.

Follow the steps below to set up Tasker for each Action above.

Step 1:

  1. Open OpenVPN Connect.

  2. Tap the Edit icon for the preferred profile.

  3. Find the Profile ID at the bottom of the screen and tap the copy to clipboard icon.

Step 2:

  1. Open Tasker.

  2. Create an action with the following parameters:

Action: net.openvpn.openvpn.CONNECT
Extra: net.openvpn.openvpn.AUTOSTART_PROFILE_ID:'{your_profile_id}'
Extra: net.openvpn.openvpn.AUTOCONNECT:true
Package: net.openvpn.openvpn
Class: net.openvpn.unified.MainActivity
Target: Activity

Important

Replace '{your_profile_id}' with the Profile ID you copied from your connection profile.

Step 1:

  1. Open Tasker.

  2. Create an Action with the following parameters:

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