VPN Manager for OpenVPN

  • I recently upgraded to CoreELEC 9.2.

    On the next reboot, it seems the VPN settings were lost and I had to go through the Wizard again. When I did, I get "Error updating .ovpn files or creating user credentials file. Check log to determine cause of failure".

    In the log, I see:

    "ERROR: CAddon[service.vpn.manager]: failed to load addon settings from special://profile/addon_data/service.vpn.manager/settings.xml"

    many times.

    That file exists but it is empty.

    And also from the log:

    2019-09-24 07:49:30.509 T:3325023104 ERROR: VPN Mgr : (vpnproviders.py) Can't copy /storage/.kodi/userdata/addon_data/service.vpn.manager/Downloads/PIA for VPN

    2019-09-24 07:49:30.509 T:3325023104 ERROR: VPN Mgr : (vpnproviders.py) Failed to copy supporting file /storage/.kodi/userdata/addon_data/service.vpn.manager/Downloads/PIA to /storage/.kodi/addons/service.vpn.manager//PIA

  • I don't use CoreELEC, or understand the versioning relationship to LibreELEC (if there is one), however, this was an infrequent problem on the LE8 level. Once settings.xml has been cleared, all bets are off. I never understood why Kodi blew away that file (it's not something that the addon does), but I put some changes in my code to reduce the likelihood of timing issues (writes/reads of the settings overlapping) around about the same time I put in support for LE9.

    You should be able to recover by going to setting and clicking default/ok, that should create a brand new settings.xml file that's valid, but you'll still need to set everything up again. A resinstall will probably do the same thing.

    Nothing obvious to me that I can do to fix this (other than some irritating backup/restore of settings.xml maybe, which is just a band aid, not a fix)

  • second question, if I may, please... I have already tried BulletVPN, ExpressVPN, PureVPN, Surfshark and all of them say connected (to a UK server) but ITV / BBC iPlayer / UK Turks streams still don't work :( am I missing something in the setup / could this be something about my ISP or router etc, or is this geo-location feature just a matter of luck and trying? The addon of my home locally restricted tv streaming service DOES stop working when I connect using the VPN which indicates it does indeed work. At least BulletVPN (see post above) and ExpressVPN insist it should work with specific servers, but I have always tried all the UK ones to no avail.

    Edited once, last by tyrol_gangster (September 30, 2019 at 12:59 PM).

  • second question, if I may, please... I have already tried BulletVPN, ExpressVPN, PureVPN, Surfshark and all of them say connected (to a UK server) but ITV / BBC iPlayer / UK Turks streams still don't work :( am I missing something in the setup / could this be something about my ISP or router etc, or is this geo-location feature just a matter of luck and trying? The addon of my home locally restricted tv streaming service DOES stop working when I connect using the VPN which indicates it does indeed work. At least BulletVPN (see post above) and ExpressVPN insist it should work with specific servers, but I have always tried all the UK ones to no avail.

    I use Nordvpn, I can’t get iPlayer to work even from a uk server.

    Perhaps GCHQ have setup the security for iPlayer

    I live in the uk

  • bubblegum57 sorry mate not sure if that was sarcasm with the gchq comment so just to be sure are you saying it won't work with NordVPN either or that I should try it cos it's what has made it work for you (despite the fact that you are actually based in the UK so should not need any vpn in the 1st place)?

    anyway, there must be something I am missing indeed, because on my Windows 10 PC, ITV works fine with all of BulletVPN, ExpressVPN and PureVPN. so it just doesn't work on the box. zomboided any idea what could be wrong or how I could check further, please?

    Edited 4 times, last by tyrol_gangster (September 30, 2019 at 8:38 PM).

  • bubblegum57 sorry mate not sure if that was sarcasm with the gchq comment so just to be sure are you saying it won't work with NordVPN either or that I should try it cos it's what has made it work for you (despite the fact that you are actually based in the UK so should not need any vpn in the 1st place)?

    anyway, there must be something I am missing indeed, because on my Windows 10 PC, ITV works fine both with all of BulletVPN, ExpressVPN and PureVPN. so it just doesn't work on the box. zomboided any idea what could be wrong or how I could check further, please?

    It was a poor attempt at sarcasm. Nordvpn using a uk server, wouldn't let iplayer work.

  • I can't get the link to BulletVPN to work, it needs an ID which I don't have. Post the files here or on Github in a new issue and I'll update them.

    Good luck finding a VPN that let's you access iPlayer...the only success I've had when travelling has been with Nord (maybe that was to ITV though) in the summer. In the UK, if I'm still connected to a PIA UK server, iPlayer and ITV won't connect. Maybe the apps are doing some DNS manipulation that's outside the scope of the VPN...I really have no idea.

  • I can't get the link to BulletVPN to work, it needs an ID which I don't have. Post the files here or on Github in a new issue and I'll update them.

    Good luck finding a VPN that let's you access iPlayer...the only success I've had when travelling has been with Nord (maybe that was to ITV though) in the summer. In the UK, if I'm still connected to a PIA UK server, iPlayer and ITV won't connect. Maybe the apps are doing some DNS manipulation that's outside the scope of the VPN...I really have no idea.

    Hi, first of all thanks for looking into this for me.

    I have sent you the BulletVPN files in a PM.

    I have tried, using their London 5 server (and UK - Kent from ExpressVPN) as instructed, to connect on my TV box in Android on internal memory, using their app. ITV Player Kodi add-on (version 2.5.9 from LittleWiz repo) still won't play live feeds (so possibly there is some other issue with all these live streaming plugins, or Kodi itself), however TV shows from archive (e.g. Rugby WC games) ARE playing. Also ITV Hub in Chrome works (and stops working when I disconnect from the VPN). BBC 'iPlayer WWW' Kodi add-on also works. So in addition to the PC findings in post #907, I suppose it confirms VPN as such is not the issue.

    When I try the same servers using your app (running CoreElec from SD card and the same Kodi version 18.4 as the one in Android), the ITV shows from archive give me an error dialog saying Not Available (it appears 4 times in the center of the screen) i.e. not the same "check error log" toast message in the upper right corner which appears in case of the live feeds. BBC just gives the 'available to play in the UK only' error whether or not I am connected to VPN.

    Edited 7 times, last by tyrol_gangster (October 1, 2019 at 12:17 PM).

  • I have pasted the log files here, if it helps?

    hastebin - shows BBC error

    hastebin - shows ITV error

    had to remove thousands of these lines btw to reduce the size of the log and be able to export it:

    2019-10-01 10:22:21.214 T:3809465152 DEBUG: CSettingsManager: requested setting (label149) was not found.

    2019-10-01 10:22:21.214 T:3809465152 DEBUG: CAddonSettings[service.vpn.manager]: failed to find definition for setting label149. Creating a setting on-the-fly...

    Edited 3 times, last by tyrol_gangster (October 1, 2019 at 12:33 PM).

  • Those lines started happening with Kodi 18, which changed the way settings work.

    I have no idea why the other two addons are not working - if the VPN has been estabilished, then the issue is either with the VPN provider or is something for the addon author to resolve. Honestly though, I think this is a VPN issue - connect manually via the command line (which is 'all' my addon does) and ask your provider why things are still blocked.

    I'll update the BulletVPN files somewhen this week when work is less hectic, thanks for sending them across.

  • I can’t/won’t spend time debugging other addons. If you can demonstrate the problem does not exist when you use the command line to start openvpn, with an ovpn file provided by the provider then I can look at what the addon is doing wrong. If you’re using third party software to connect and not openvpn directly, I can’t guess at what extra steps the software is taking (such as dns manipulation, or dynamic profiles) to make it work

  • Linux (and LibreElec which is obviously Linux based) has the annoying habit of leaking you're ISP's DNS address which could possibly reveal you're identity, although you're connected to a VPN. Just change you're DNS server to one of the open source DNS servers like OpenNic or public DNS and that should fix you're problem. Choose one of the DNS server addresses at OpenNIC Project. Then in Kodi goto LibreElec Configuration addon => Connections. Choose the connection you use, then click on "edit". Then choose DNS-servers and enter in nameserver #1 the DNS address you've chosen from OpenNic. (for example: 195.10.195.195 which is a german name server) Then reboot... That should fix you're problem... Here's some reading material about DNS leakage in Linux: How to check and fix DNS leak in Linux

    (If you really want to be secure, you could also implement a "VPN Kill Switch". This makes sure you can only access the internet through you're VPN. As soon you're VPN connection drops, you're entire internet connection will be cut off, making sure that you're own public IP address won't be revealed...)

    Thanks for this information! It has allowed me to get a geolocked addon working properly using expressvpn. I just switched the ipv4 connection type to manual instead of dhcp which then allowed me to delete the DNS server IPs altogether and forced DNS requests to go through the VPN tunnel.

  • I'm using NordVPN in Australia and have been able to bypass geoblocking on my PC.

    BBC IPlayer regularly blacklists Nord's UK IP addresses so connection can be a bit hit and miss.

    However, they list a number of IPlayer "preferred" IP's that work most of the time.

    I just installed your app on the latest Libreelec Pi4 distro.

    I have changed the DNS to Google's (as above post) but am still geoblocked.

    So far none of the randomly allocated Nord IP's match any on their preferred list.

    Is there any way to manually enter a specific Nord IP to connect to, in the app?

    Thanks

  • You'd have to manage those connections yourself by getting an ovpn from Nord and using the User Defined wizard to create a connection. As they change so often you'll quickly run up against the issue that Nord likely change their servers to combat the issue and you'll have to keep doing this.

    Nord connections are all dynamically generated based on some requirements they gave me a year or so back and corresponding API. Those requirements were to display a list of countries as a way of selecting servers. They didn't want to surface the more complex aspects of their service such as dedicated IPs, or I'm guessing IPlayer preferred IPs.