-
Notifications
You must be signed in to change notification settings - Fork 80
08. Connection Switching
You can cycle through any of the validated connections either by using the 'Cycle through primary VPN connections' option in the add-on menu or by using a button on your remote. When cycle is selected/pressed, a notification box will appear indicating the current state of the VPN connection. After ~10 seconds this will disappear and nothing will change. If cycle is pressed again, an orange icon will appear asking if you want to connect to that profile.
You can repeatedly cycle through the connections and after ~10 seconds of inactivity, you'll be connected to the last displayed profile (you'll see a Disconnect/Connecting/Connected notification). If you decide against changing connections, cycle back to the current connected profile and nothing will change.
The inclusion of the disconnect option whilst cycling is dependent on an option set in the Settings/Monitor tab.
Alternatively you can bring up a dialog in response to a button on your remote. When this is pressed a list of connections with appear, either all connections for the VPN provider (with the protocol filter (UDP and/or TCP) applied), or a list of the validated connections. The current state will be in the title of the window and highlighted in the list.
Selecting a new connection will lead to the current connection being disconnected and reconnected to the new connection.
To set up cycling, the easiest way is to use the Map VPN connection cycle button or Map VPN connection table button option. Alternative, you can edit configuration files. The following instructions are for LibreELEC type installs and assumes you can use Putty to SSH onto the Kodi box and use the command line.
If you're not currently using any custom keymaps then the easiest way is to install the Keymap Editor add-on from the official (?) repo and save out a file (it's called gen.xml
and for LE it's in /storage/.kodi/userdata/keymaps
). You need to update one of the keys to run the cycle script using:
runscript(/storage/.kodi/addons/service.vpn.manager/cycle.py)
or to run the table script using:
runscript(/storage/.kodi/addons/service.vpn.manager/table.py)
If you're manually mapping keyboard keys you can use the long keypress mod to have both cycle and table on the same button. I've found this to be ineffective on a TV remote however as the long keypress doesn't appear to work well.
Check out the remote.xml
file inside the VPN Manager zip file, or on your Kodi box (for LE) at /storage/.kodi/addons/service.vpn.manager
to see an example. Alternatively just copy the remote.xml
file as /storage/.kodi/userdata/keymaps/gen.xml
file to use the blue button on a CEC enabled remote.