WireGuard toggle on_off specific WiFi(s) v3

by Rapha

Version 1 (October 29, 2024)

Download (91 downloads)

Advanced automatic control of WireGuard.
Multi-Wifi list. User friendly configuration.
Multi-Vpn tunnels association (split tunnel or full tunnel, per-ssid )
(~100 blocks)
(Must enable "Control tunnels" additional permission in Automate system settings page.)

This is the Version 3 of this flow. The difference from the first is that it also takes in account a second list of SSIDs which should trigger a different tunnel.
The difference from the second version is how it tries harder to be more reliable on connecting/disconnecting on some situations.

I use this so I can automatically connect to a split tunnel or a full tunnel, depending on situation (on mobile, work wifi, etc )

***Updates 2024***
• Add more stubborn logic to make sure vpn connects/disconnects while slowly losing wifi signal (driving away from home, phone locked on pocket)
• Updated connectivity tests, added a http GET test, since sometimes my workplace block icmp ping packets. This improves reliability. (observation: the http block requires more permissions, that is why the required permissions for the flow)
• Updated connectivity checks timeouts
***update 2023-02-27***
• Improve reliability when fast switching between one wifi to another, when both are whitelisted.
***update 2023-02-20***
• Improve the retry logic when network is unnavailable, preventing flow from stoping after only 10 retries, as it was the case previously. Also, progressively increment the interval between retries.
***updated 2023-02-14***
• fix for second list setup logic
• log improvements
***originally created january-2022***