Posts by zomboided

    CLTSinisterOne, full Kodi log, with debug switched on please. Use pastebin. It shouldn't fail to connect but not tell you about it.
    [hr]


    I have downloaded them from the provider.

    miketyson I can't check to see if anything has changed with that provider. You'll have to help - Can you go here How to set up VPN on Linux

    Get a few ovpn files and the latest set of keys and certs and send them to me in a PM (don't post publicly). I don't need your user ID or password, I just need to compare files (I also have multiple VPN services available to me so I definitely don't need to borrow your connection)


    Hi
    How can I stop and start the VPN from an ssh session?
    Thanks

    If you do this using kill and openvpn you'll be battling with the add-on doing the same thing in response to whatever is going on in Kodi. If you want to do this then you'll need to either not use the add-on or look at whether you can do what you need to do via the API (documented on the wiki), by suspending the filtering and disconnecting/reconnecting or by faking the connection and just using the openvpn commands directly (this is what I'd recommend)

    jahutchi as you're clearly not a basic user, please do an experiment for me.

    ssh onto your Kodi box. cd /storage/.kodi/addons/service.vpn.manager
    Edit service.py

    Line 565(ish...) has this:
    current_name = xbmc.getInfoLabel("Container.FolderName")
    straight after it add
    window_id = xbmcgui.getCurrentWindowId()
    newPrint("Window ID is " + str(window_id))

    It's python, so you'll need to space out the indent (not tab) and line it up with the preceding line.

    Reboot (this bit is necessary to pick up the change), wait for the VPN to connect then go to live TV. Then stop with the GUI check out the Kodi log via SSH (/storage/.kodi/temp/kodi.log). You should multiple messages that look like this :
    22:53:56 T:10076 ERROR: Window ID is 10617

    I need you to identify the number shown after you switch to live TV. My guess is that it'll be the last one you see, and maybe there will be multiple, like one every 10 seconds or so. What's the number at the end? You'll also see a bunch of other messages with different numbers (likely 10000) before it. You can ignore these.

    Then back to the GUI and play around with Live TV, opening streams, going to records, whatever you do and then look at the log again. What other numbers do you see? I'm trying to establish if Live TV (and radio) always uses the 10600 - 10699 range.

    If they are in the range I'm guessing, then go back to the service.py file.
    Delete this line of the change you made above :
    newPrint("Window ID is " + str(window_id))
    and replace it with :
    if window_id > 10600 and window_id < 10699: current_name = "Live TV"

    Now reboot and try using your system. In my testing, I see this working fine, but I'm using the demo PVR and the simple PVR to test with, not TVheadend. If I use iVue, it doesn't work as it's not a PVR add-on and uses a custom window ID. Can you also do other stuff, like use other filtered add-ons that need a differnet VPN and check that the Live TV will always revert to your primary too please?

    Let me know what you find out. If this works you can keep running with it for the time being.

    miketyson

    If you're trying to put random files in directories yourself, stop. Reinstall it. Let the add-on run, and when asked to supply a key, point the GUI at the the relevant ovpn.
    If it doesn't work after you've done this then get a FULL Kodi log (on pastebin) and I'll look.

    Cert hasn't changed since the last time I changed it (I just checked). ovpn files look the same. Servers appear to be largely the same (I didn't check all of them). And your system time/date looks ok. I don't know what to suggest beyond you trying to connect using the command line with their ovpn files to eliminate what I'm doing in the add-on and then contacting their support.
    [hr]


    Can we use this thread for VPN Mgr issues please
    thread-5032.html

    jahutchi from thread-4067-post-38733.html#pid38733

    It works like that by design, otherwise it switches at random(ish) times and switches back again.

    Your stop idea will only work if you quit out of the add-on too, which you could do using Kodi commands to go to the main window (I think). But it'd be crap if you wife was binge watching 'Call the Midwife' (check out my stereotyping). Otherwise next time the window changes it'll see it's iPlayer and catch the filter to disconnect.

    Likewise doing it on a timer won't work for the same reason as you've noted. Might be more friendly to force the window to the main window at 1am though.

    Having your scripts control it directly might work if you pause and restart the filtering around a connect (all using the API). There's also the fake option, which I added for when I wanted to control the VPN outside of Kodi myself without wanting to mess with settings inside Kodi. I can't think how you'd use that effectively here, but I don't really know what your scripts are doing.

    I started looking at IPTV recently and the right way is for the add-on to recognise where the source is and for me to add a filtering API for them to use. Probably won't happen as there seem to be lots of differing IPTV options.

    Maybe I'll look to see if I can detect Live TV and switch based on that. I think I looked at this before and concluded I couldn't.

    I'd also (I have) set up a cycle button and use that to reconnect or check, but I agree it's not wife-friendly.

    Can we use this thread to avoid having too many for this add-on?
    thread-5032.html

    To answer your question - I do this all the time (it's why I wrote this add-on), using PIA, with BBC iPlayer on the excluded list. It won't reconnect until it sees another add-on (ie you have to do more than just exit to the main Kodi screen). You also have to connect at boot to establish that your 'default' is running with a VPN. If you're already disconnected when you start up the iPlayer, then it'll assume the previous state is disconnected (and 'return' to it). If this doesn't work for you, then take a screen shot of the settings and run debug and post a log via pastebin in the other thread and I'll take a look

    I run with this option on myself. If I do a ps -ef, I see this:
    306 root 0:00 /usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config
    which tells me that the VPN service has started as part of the systemd process. If you see a different --config, then systemd has not started it.
    The debug log tells me the same thing. And the routing table looks fine.

    The service waits for the network to be available and it uses 'WantedBy kodi.target' to request that Kodi waits for it to be run (I think...).
    However, the service is forked and if it takes ages for the VPN connection to start then I guess it's possible that there's a race condition and Kodi will go on to initialize and start running add-ons before the VPN is available. For my install it looks like Kodi spends 3-4 seconds starting before the weather add-on and VPN Mgr kicks in (which is ample time for my VPN connection to start). Yours might be starting quicker as it's doing different/less things.

    2.7.1 is on the repo and GitHub. It's a minor update that allows some default files to be overridden.

    It's relatively uninteresting right now but will allow certs, etc to be updated when they change without waiting for me to update them within the add-on. Most users just shouldn't try and do this, but if you want to break things then it's documented on the wiki

    It has been asked before and it's not going to happen as it's a problem largely unique to Nord. Most providers appear to provide a single domain name to encapsulate a bunch of servers across which they load balance (or at least give that option). Nord prefer to surface all of the servers via 1500 of opvn files, containing 1500 different IP addresses, which they frequently change. If they decide to move things around (maybe to avoid VPN blocking), then their users have to go refresh their ovpn files (or use the new IP addresses). If users don't want to use their app, then Nord should provide a better way of using their service (in my opinion) like other VPNs.

    If Nord are now doing things differently, I'll revisit how it's supported. If they're still doing this, then nothing is gonna change here.

    1. The connection is handled by systemd before Kodi launches. It doesn't matter than the add-on is not running. When the add-on is up and running it'll look to see if there's a VPN connection active (based on whether the openvpn task is running) and then "guess" what it's connected to (ie the first validated connection).

    2. You can look at pushing a dhcp-option to set the DNS via an up script - using up scripts are documented on the add-on wiki and dhcp-option is documented in the openvpn docs. Or you can always use a particular DNS by setting it within Libreelec - I'm not in front of a box tho so you can google how to do that. You can either use the DNS that your VPN provider gives you or just use google's own DNS servers. I'd probably just set it up to use google's for simplicity like apc is suggesting above.


    I just came across this Excellent Addon, and it seems to work fine..

    The only problem I am seeing (and im jumping alot between VPNs as I am testing the VPN provider (NordVPN)) is that it will some times hang when trying to switch connections and will only start working after a reboot..

    I will keep an eye on this development. :)

    Install the latest version, switch debug on in settings/debug and then get me a log. Shouldn't hang, that code has been stable for months.