OpenVPN Connection Based on WiFi new

by Matjaz Bavcon

Version 1 (March 11, 2020)

Download (32 downloads)

Connects to OpenVPN while outside home. Disconnects at home. This flow is based on the SSIDs of your home network (I have used four SSID checks since I have four APs at home). Attention! You have to edit the SSIDs to reflect your setup at home. Also you have to edit the connect and disconnect OpenVPN shortcuts. make sure you are using the official OpenVPN client!
If OpenVPNclient does not provide shortcut's:
-----‐--------------------------------------------------------
Connect:

PACKAGE: fx ="net.openvpn.openvpn"
ACTIVITY CLASS: fx ="net.openvpn.unified.MainActivity"
(or select "net.openvpn.unified.MainActivity" from "Pick activith...> OpenVPN Connect")
Action: View
DATA URI: (empty)
MIME TYPE: (empty)
CATEGORY: (don't select)
EXTRAS: {"net.openvpn.openvpn.AUTOSTART_PROFILE_NAME": "PC [*your openvpn profile name]", "net.openvpn.openvpn.AUTOCONNECT" as Boolean: 1, net.openvpn.openvpn.APP_SECTION": "PC"}
  *if your openvpn profile name is "vpn.example.com/autologin", AUTOSTART_PROFILE_NAME is "PC vpn.example.com/autologin"
FLAGS: (don't select)
CHOOSER: not checked
------------------------------‐-------------------------------
Disconnect:

PACKAGE: fx ="net.openvpn.openvpn"
ACTIVITY CLASS: fx ="net.openvpn.unified.MainActivity"
(or select "net.openvpn.unified.MainActivity" from "Pick activith...> OpenVPN Connect")
Action: fx ="net.openvpn.openvpn.DISCONNECT"
DATA URI: (empty)
MIME TYPE: (empty)
CATEGORY: (don't select)
EXTRAS: {"net.openvpn.openvpn.STOP" as Boolean: 1}
FLAGS: (don't select)
CHOOSER: not checked
‐----------‐-------‐------------------------------------------