Toggle WireGuard based on home WiFi connection

by Ron

Version 1 (January 6, 2022)

Download (64 downloads)

*VERIFIED* Enable WireGuard VPN tunnel when not connected to a specific WiFI SSID, and disable when reconnected to that WiFi. Adds a check for mobile network connection before connecting to tunnel.
Before using 1) in Automate>Settings, enable "Control Wireguard tunnels" 2) Change the WiFi name to your home WiFi inside the WiFi SSID block 3) Change the Wireguard tunnel name in the UP and Down blocks.
UPDATE: Added a "ping" block to verify mobile connection before tunnel goes up. Otherwise in some cases the tunnel goes up too early and you don't have internet.