Automatically launch VPNs when different addons are opened
#1
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.
Reply
#2
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.
Reply
#3
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?
Reply
#4
Im interested in this exact thing, can it be used with dns?
Reply
#5
yes, it uses the openvpn addon by brian hornsby.
Reply
#6
Brilliant, could you email it over with a bit of a description?
Reply
#7
+1
Reply
#8
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 ;-)
Reply
#9
Ha ha thank you
Reply
#10
you can dl the service addon here:
https://www.dropbox.com/s/gb8qftwx3vli7v...6.zip?dl=0

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!
Reply
#11
Spank-you very much
Reply
#12
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!
Reply
#13
@Alth79 This might help http://forum.kodi.tv/showthread.php?tid=149808
Reply
#14
@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
Reply
#15
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",...)?
Reply

Logout Mark Read Team Forum Stats Members Help
Automatically launch VPNs when different addons are opened1