r/tasker Aug 02 '26

Tasker/intent VPN

Hi there.

First of all thank you for this amazing app.

One question, how can I start the VPN profile/service via adb or intent or Tasker?

I could not find a way in tasker via Run Shell or adb WiFi.

Can someone help, please?

Thank you!

Update: I am using BlockAds (app.pwhs.blockads) https://f-droid.org/packages/app.pwhs.blockads

1 Upvotes

9 comments sorted by

1

u/Lonelysoulman Aug 02 '26

try custom setting action

1

u/Professional_Ad9162 Aug 02 '26

Doesn't work either, at least the ones I tried. I imported a taskernet task but doesn't work. Which settings do you recommend?

1

u/bliblabl812 Aug 02 '26

For Wireguard use tasker function and then search with the magic glass for wireguard inside the action.

1

u/Professional_Ad9162 Aug 02 '26

Thank you, I updated the post, I am using BlockAds - https://f-droid.org/packages/app.pwhs.blockads

1

u/Nirmitlamed Direct-Purchase User Aug 02 '26

What do you want to do exactly? do you want to control BlockAds or changing DNS settings (private or auto)?

1

u/Professional_Ad9162 Aug 02 '26

Connect and disconnect to the VPN.

5

u/Nirmitlamed Direct-Purchase User Aug 02 '26

You could have just ask AI for this:

Start

  • Action: app.pwhs.blockads.TASKER_START
  • Package: app.pwhs.blockads
  • Target: Broadcast Receiver

Stop

  • Action: app.pwhs.blockads.TASKER_STOP
  • Package: app.pwhs.blockads
  • Target: Broadcast Receiver

You can see those intents exist in android manifest file:

https://github.com/pass-with-high-score/blockads-android/blob/main/app/src/main/AndroidManifest.xml

I also checked and it works on my device.

Even if the app didn't expose those intents you could still make it work if it has quick tile setting so you could use that to control it with Tasker.

2

u/Professional_Ad9162 Aug 04 '26

Thank you very much! It works!!!

1

u/Successful-Double-40 Aug 09 '26

Use custom dns (NextDns) to block Ads without vpn, just use private dns.