Problem Using Tasker to Auto Disconnect VPN

Support requests about VPN Client Pro
gil_happy
Posts: 6
Joined: Fri Mar 14, 2025 7:00 pm

Problem Using Tasker to Auto Disconnect VPN

Post 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!
admin
Site Admin
Posts: 763
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

Re: Problem Using Tasker to Auto Disconnect VPN

Post by admin »

Hello,

to connect/disconnect VPN in Tasker you don't have to use Intents, but the VPN Client Pro settings plugin
gil_happy
Posts: 6
Joined: Fri Mar 14, 2025 7:00 pm

Re: Problem Using Tasker to Auto Disconnect VPN

Post 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!
admin
Site Admin
Posts: 763
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

Re: Problem Using Tasker to Auto Disconnect VPN

Post 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
gil_happy
Posts: 6
Joined: Fri Mar 14, 2025 7:00 pm

Re: Problem Using Tasker to Auto Disconnect VPN

Post 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
admin
Site Admin
Posts: 763
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

Re: Problem Using Tasker to Auto Disconnect VPN

Post 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
gil_happy
Posts: 6
Joined: Fri Mar 14, 2025 7:00 pm

Re: Problem Using Tasker to Auto Disconnect VPN

Post by gil_happy »

Thank you!
gil_happy
Posts: 6
Joined: Fri Mar 14, 2025 7:00 pm

Re: Problem Using Tasker to Auto Disconnect VPN

Post 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!
admin
Site Admin
Posts: 763
Joined: Fri Feb 15, 2019 4:04 pm
Contact:

Re: Problem Using Tasker to Auto Disconnect VPN

Post 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".
gil_happy
Posts: 6
Joined: Fri Mar 14, 2025 7:00 pm

Re: Problem Using Tasker to Auto Disconnect VPN

Post by gil_happy »

Hello, everything is now working as needed. The plug-in works for us 👍

You can resolve / close this issue. Thanks
Post Reply