VPN Wireguard Automation

by Yassine Nacif (Nassh)

Version 4 (January 23, 2024)

Download (5,419 downloads)

Recent updates:
23/01/2024
- Creates a fork asynchronously for each network change for a more reliable tunnel control
- Added a user dialog to ask to show or not toast messages with updates on the tunnel
- Easier set up so the user only have to update the wifi1 and wifi2 variable blocks.

***PLZ READ!!!***
Full reliable vpn automation for wireguard.

It simply toggles on and off according to your network.

If you are connected to your home network (or a network of your choice), it will toggle off, and once such network is left it will toggle on wireguard until you reconnect back to that network.

It is designed to properly set the VPN on or off upon starting the flow. Making it reliable in case the phone restarts, or sudden network changes.

It is also designed with high connectivity in mind. Meaning, that once your Tunnel is enabled, the flow will run a Ping test to Google (a simple connection test to the Internet) to check if you have internet access. If the test fails, it proceeds to disable the tunnel.

To set up:
1. Go to your Wireguard app, in settings, enable "Allow remote control apps"
2. Go to your Automate Settings > Privileges and enable "Edit wireguard tunnels"
3. Edit the following blocks in this flow:
3.1 Blocks with IDs 72 and 73, which are variable blocks. Put in them the name of the wifi (SSID) for which you want your VPN disabled. If you only have 1 single wifi you want to put, feel free to set the same name on both blocks or keep the block with ID 73 empty.
3.2 Blocks with id 8 and 9, look for Extras, and there you will see: {"tunnel": "your_tunnel_name"}
Change your_tunnel_name with the name of your actual tunnel. You should find it on your Wireguard app.

Comment, rate, or even remake.

Thanks and I hope it is helpful.

4.7 average rating from 13 reviews

5 stars
10
4 stars
2
3 stars
1
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.