Page 1 of 2

Problem Using Tasker to Auto Disconnect VPN

Posted: Fri Mar 14, 2025 7:05 pm
by gil_happy
Hello,

We are trying to use Tasker in order to create an automatic connect/disconnect action.

The connect action seems working fine with following Intent:

Action: it.colucciweb.vpnclientpro.CONNECT
Extra: profile=[profile_name]
Package: it.colucciweb.vpnclientpro

But I couldn't find the right intent to disconnect the VPN. Can you please provide us with the disconnect steps? Or, does the app itself has an auto disconnect that we can use?

Thanks in advance!

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Sat Mar 15, 2025 1:22 pm
by admin
Hello,

to connect/disconnect VPN in Tasker you don't have to use Intents, but the VPN Client Pro settings plugin

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Sat Mar 15, 2025 8:15 pm
by gil_happy
Hello... thank you for the quick update. I have a couple of questions for you:

- What do you mean by VPN Client Pro settings plugin?
- Also, since you mention that I don't have to use Intents, I then have a question about this. I know in the settings, there is an option to launch and automatically connect the VPN when a specific app is selected - this seems to work just fine. However, how do I get the VPN to disconnect when the app is 'exited'? In my case, I exit the app by selecting the 'HOME' button on the remote control on my Android TV streaming box.

Thanks!

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Mon Mar 17, 2025 8:49 am
by admin
Hello,

you can find the plugin in the available actions in the Tasker app.

Unfortunately, there is no way to know when an app is closed.
To disconnect the VPN automatically you can try using the "Disconnect when the VPN is inactive" option

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Wed Mar 19, 2025 11:36 am
by gil_happy
Hello, can you please provide instructions on finding the plugin in the Tasker app? Myself along with someone else are unable to find this.
Thank you

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Wed Mar 19, 2025 4:01 pm
by admin
Hello,

here the steps:
  • start Tasker
  • tap on "TASKS"
  • tap on "+" button
  • tap on "CREATE"
  • insert task name
  • tap on "+" button
  • tap on "Plugin"
  • tap on "VPN Client Pro"
  • tap on "Configuration"
  • select VPN profile
  • select Action
  • save the changes

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Wed Mar 19, 2025 4:59 pm
by gil_happy
Thank you!

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Fri Mar 21, 2025 3:14 pm
by gil_happy
Hello, I have a couple of questions after performing additional testing:

1. Can I submit a Feature Request for the ability to add a VPN Disconnect via Intent?
2. Can I use the onDemand option inside the tasker plugin to disconnect the VPN?

Thank you!

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Fri Mar 21, 2025 6:22 pm
by admin
You're welcome.
  1. Sorry, but this feature cannot be implemented because it would allow any app to disconnect the VPN without the user's permission. For this reason, the Tasker plugin interface has been implemented (which can also be used by other compatible apps). Unlike sending a simple Intent, the user must first manually configure the plugin and then implicitly give his permission to change the VPN state.
  2. Maybe I didn't understand the question well. However, the plugin that allows you to change the VPN status requires 4 parameters:
    • the VPN profile on which you want to apply the action, in addition to the profiles there are also the special values ​​"*none*" (indicates that you do not want to perform any action on the VPN profiles) and "*running vpn*" (indicates the VPN that is running when the action is called)
    • the action to perform on the selected VPN profile
    • the action to perform on "Auto connect monitor" which can be "*none*" (indicates that you do not want to perform any action), "Enable" (indicates that you do not want to enable the feature) and "Disable" (indicates that you do not want to disable the feature)
    • the action to perform on "On demand monitor" which works as already described for auto connect.
    So to disconnect the VPN you should set the VPN profile to a specific VPN or to "*running vpn*" and the action to "Disconnect".

Re: Problem Using Tasker to Auto Disconnect VPN

Posted: Wed Mar 26, 2025 5:27 pm
by gil_happy
Hello, everything is now working as needed. The plug-in works for us 👍

You can resolve / close this issue. Thanks