IPTV on Android TV with a VPN?

by JoeCoT

I'm trying to use an M3U IPTV provider on my Android TV with OpenVPN. I confirmed that OpenVPN works (both with the OpenVPN app, and the provider's app), and that I can use an app to connect to the IPTV provider. If I connect directly, it's fine. If I connect through the VPN, the video plays but stutters and buffers. Given I use a VPN elsewhere on my network and can get 15+ mb/sec download speeds on torrents, I don't think the issue is the VPN connection. I think the issue is the TV running the VPN -- that my TV's CPU can't keep up with the encryption fast enough.

Is there some method for using IPTV on my android TV, and have the VPN connection terminated at my home server?

  • Is there some IPTV server software I can run on my home server that I can setup the M3U playlist with, run over OpenVPN, and connect to from my Android TV?
  • I see that there are M3U plugins for Plex. Is there a setup that would allow me to use OpenVPN only for the IPTV connection for Plex?
  • Is there some other setup I should be considering?

EDIT In case there's someone from the future that looks into how to do this, here's a quick and dirty guide of how I resolved this. You need a separate home server to run Plex on, and then you use Plex with your Smart TV normally. Read all of this before starting

5 Parts:

  1. docker . You need to have docker installed on your home server. This is a prereq for the rest of this

  2. dperson/openvpn You use this openvpn docker container to connect to your VPN

  3. telly , an IPTV proxy for Plex

  4. dperson/nginx A docker container that will proxy the telly proxy (yo dawg) for you

  5. plex , including Plex Pass

Step 1 Configure dperson/openvpn to use your VPN client. Lots of instructions linked at the project link above

Step 2 Configure telly in docker. Here's their docker how to which is easy enough to follow. You're going to configure your URLs for your IPTV provider here.

Step 3 Configure the telly docker container to connect through the openvpn container instead of directly. If you're worried about your IPTV provider logging your real IP at all, do this as part of the telly setup in Step 2

Here's the configuration presented in telly's docker config walkthrough:

docker run -d \
  --name='telly-test' \
  -e TZ="America/Chicago" \
  -p '6077:6077/tcp' \
  -v ${MY_DIR}/telly.config.toml:/etc/telly/telly.config.toml \
  --restart unless-stopped \
  tellytv/telly:dev-ffmpeg    

We're going to change 1 line from that:

docker run -d \
  --name='telly-test' \
  -e TZ="America/Chicago" \
  --net='container:vpn' \
  -v ${MY_DIR}/telly.config.toml:/etc/telly/telly.config.toml \
  --restart unless-stopped \
  tellytv/telly:dev-ffmpeg

The only thing that needs to change is 1) removing the 6077 port forward from the container, and 2) setting the networking for the telly container to use the vpn container (whatever container name you gave your openvpn container). The good news is that this means all of the telly container's networking will go over the vpn instead of your local network. The bad news is we can't use the normal port forwarding. Step 4 solves that.

Step 4 Use the dperson/nginx docker container as a proxy for the telly container. Here's an example config for that:

docker run \
    --name=nginx-telly \
    --rm \
    -p 6077:80 \
    --link vpn:telly-test \
    -e TZ="America/New_York" \
    dperson/nginx \
    -w "http://telly-test:6077;/"

This will run the nginx proxy on 6077 on the server (where all the rest of the telly guides expect it to be)

Step 5 Connect Telly to plex

Home that helps. If you run into a problem I can maybe help if you leave a comment, but you're probably best off soldiering through it. But remember I didn't ask the question and solve it myself without giving a solution. Good luck.

JoeCoT

I managed to get this working by using the Telly project with Plex, and running its networking through an openvpn docker container. I've updated my post above with the general instructions. Good luck.

jekpopulous2

Get a Raspberry Pi and install OpenVPN on that.

FoxRiver

my guess is too much processing load on the android tv - i believe you can get openwrt or ddwrt to do what you want in terms of vpn tunneling on a router instead of the tv; and then either dedicate that router to vpn or slice it logically to partially dedicate. However, if not at least remotely familiar with that it could be a steep learning curve.

kneegrowmang

yeahi was bufffering a lot on mag. ended up stopping vpn and worked smooth.

hugedeals

i use the nordvpn app on my firestick and then open iptv smarters to watch, seems to work fine. anyone else using this method and is it actually affective?

KronicNiteLife

Here is an article that might help you, basically the idea is to set up your vpn at the router level.

https://www.makeuseof.com/tag/set-router-vpn-using-dd-wrt/