Automatically launch VPNs when different addons are opened
Hi All

Firstly I would like to say a big thank you to all of the developers who have contributed to making kodi - it's is head and shoulders the best piece of software that I have ever used! Awesome!

I have kodi installed on a PC running windows 8.1 using 1080XF skin and have created several batch files that close any VPNs that are running on my PC and open up another VPN for a different country. These are situated on the applications screen of the skin and I use advanced launcher to run the batch files. I was wondering if there was a way to automatically run certain VPNs when a particular Addon was opened? I was thinking something like: when I open PLUS7 a batch file would also run and close any VPN connection currently running and connect the Australian VPN, if I was then to open SkyGO Launcher or Filmon a batch file would also run and disconnect the Australian VPN and connect a UK VPN and so on.

I hope this makes sense. Like I say my batch files already run correctly I was just hoping to automate them to run in conjunction with particular Addons.

Thanks in advance for any support or suggestions that anyone can give.
i already wrote a little service addon to automatically switch vpn connections when opening a specific addon. but it's using the "openvpn" addon to establish the connections.
if you are familiar with python you can easily change it to your needs.

tell me if you need it - i will send it to you and explain how it works.
Hi marv_el thank you for the reply. That sounds great - I am not familiar with Python but would be willing to give it a try if you could send it over? Does it use the openvpn addon created by Brian Hornsby?
Im interested in this exact thing, can it be used with dns?
yes, it uses the openvpn addon by brian hornsby.
Brilliant, could you email it over with a bit of a description?
yes, i can. i am at work right now so pls be patient. i'll do it when i return home and my son's sleeping ;-)
Ha ha thank you
you can dl the service addon here:

first you have to setup the vpn connections by importing the openvpn configurations within the openvpn addon (import openvpn configuration file). read the description how to do it on brian hornsbys homepage and test it before you set up my addon.
give them names like "uk" and prevent spaces or special characters to ensure that my addon will handle them correctly.
then go to my addon settings page and insert the addon name (or part of it - for example "iplayer") and the vpn profile name ("vpn name"), for example "uk". you can set up 10 different addons this way.
that's it...if you open the iplayer addon it should switch to "uk" automatically.
pls be aware that the connection needs some seconds to establish, so wait a bit before browsing further.

have fun!
Spank-you very much
Cheers mate!

I have been looking into the open vpn addon and looks like it doesn't work on Windows? Shame if not because your addon would do everything that I need!
@Alth79 This might help
@stuCONNERS thanks for the link but from what I understand I may already have something like this set up for my VPN connections - I use advanced launcher to run batch files which open and close vpn's from the home screen. I was looking for something to automate the process like the addon from marv_el does. It's just a shame that the OpenVPN addon doesn't appear to be compatible with Windows.

@marv_el could your addon be tweaked to run specific batch files rather than linking with the openvpn addon to connect the VPN?

Really appreciate the help guys
i think it's rather easy doable with the advanced launcher, but need further investigation. instead of excecuting the openvpn addon with the profile (let's take the example from above -> "uk") i replace it with the advanced launcher addon and execute the file "uk.bat".

how are your bat files organised? do you have a separate batch file for disconnecting the vpn connections before establishing another vpn conn. (like "uk.bat", "disconnect.bat", "de.bat", "disconnect.bat",...)?

Logout Mark Read Team Forum Stats Members Help
Automatically launch VPNs when different addons are opened1
This forum uses Lukasz Tkacz MyBB addons.