A Tasker project that automates AdGuard for Android to bring together VPN and ad blocking on non-rooted devices.
If you're using AdGuard in Local VPN mode, you cannot use any other VPN apps at the same time.
You may say, "But AdGuard VPN can work with it."
Sure, it works with AdGuard in Integrated mode, but what if you use Hiddify/NekoBox/Shadowsocks/other client? AutoGuard acts as an artificial Integrated mode for these apps.
When you enable both apps, AdGuard VPN automatically switches to Proxy only mode and sends its proxy details (type and port) to AdGuard. AdGuard receives this information and configures filtering through that proxy. The traffic flow looks like this:
Device → AdGuard → proxy → AdGuard VPN → Internet
When you turn off AdGuard VPN, it notifies AdGuard again, and AdGuard removes the proxy from the chain:
Device → AdGuard → Internet
The proxy between the two apps is the glue. One app launches it to receive traffic, while the other forwards the filtered traffic to it.
AutoGuard is an advanced Integration Mode. It sends signals to AdGuard when you start or stop a connection in your VPN app.
- Switch your VPN client to Proxy only mode
- Enter its proxy details (type and port) in AutoGuard
Now, when you enable your VPN app, the proxy launches inside it. AutoGuard detects this and sends a signal to AdGuard so it can reconfigure filtering through that proxy.
When VPN is on → proxy in your app is running → AutoGuard sends an intent to AdGuard → AdGuard configures filtering like below
Device → AdGuard → proxy → your VPN app → Internet
When VPN is off → proxy is stopped → AutoGuard sends an intent → AdGuard configures filtering
Device → AdGuard → Internet
- Import AutoGuard to Tasker
- Give it permission to work in background
- Add Tasker and your VPN app to AdGuard's filtering exclusions
- Enter the AdGuard automation password
- Enter your VPN app's proxy server type and port
Open AdGuard, go to Settings → General → Advanced → Automation. Copy the password and paste into AutoGuard.
Switch your VPN client to the proxy only mode, then enter its inbound local proxy type and port into AutoGuard.
Shadowsocks-based clients
For Shadowsocks, SagerNet, Matsuri, NekoBox, husi, Exclave etc.
Exclave as an example.
Open sidebar, go to Settings. Set Service mode to Proxy only.
Scroll down, check your SOCKS5 port. You can also enable HTTP server if you want.
Enter it into AutoGuard. You can enter HTTP server port if you enabled it.
v2rayNG
Open sidebar, go to Settings, scroll down. Remember the value in Local proxy port.
Hiddify
Open Settings → Inbound. In Service mode select Proxy service only and remember the value in Mixed port.
Karing
Open Settings, disable Novice Mode. Scroll down, select TUN and disable it.
Return to Settings, select Port.

Enter to AutoGuard the Rule Based one or the Proxy All port.

WG Tunnel
In Settings, set App mode to Proxy.
Tap on App mode, enable SOCKS5 and/or HTTP proxy type(s). Enter 127.0.0.1: and any port you want.
Enter type and port to AutoGuard.
InviZible Pro
AdGuard can be integrated with Tor.
On the main screen, in the three-dots dropdown menu select Proxy Mode.
Open sidebar, go to Tor Settings. Scroll down to the proxy options. Enable SOCKS or/and HTTP type(s).

ByeByeDPI
Go to Settings, set Mode to Proxy.
Check the value in Port. Enable HTTP proxy if you want.

Enter the port to AutoGuard and select SOCKS5/SOCKS4 as server type. You can select HTTP if you enabled it.

Clash Meta for Android Alpha
Open Settings → Network, disable Route System Traffic.
Go to Settings → Override, choose any HTTP Port and Socks Port you want.
Enter it to AutoGuard. Both SOCKS5/4 types are good for Socks Port.

Orbot
AdGuard + Tor
Start connection to see SOCKS5/HTTP ports.
Go to More tab. Remember one of the port values, then go to Orbot Settings → General

Enable Power User Mode. It's equivalent to Proxy Only Mode.

Enter one of the port values to AutoGuard and select the appropriate type.

AutoGuard can work with old AdGuard versions (v3.6.11 and below). Enable Legacy mode in AutoGuard's Advanced Settings.

























