All Projects → pierre-emmanuelJ → iptv-proxy

pierre-emmanuelJ / iptv-proxy

Licence: GPL-3.0 license
Reverse proxy on iptv m3u and m3u8 file and xtream codes client api

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to iptv-proxy

useetv-playlist
No description or website provided.
Stars: ✭ 41 (-82.55%)
Mutual labels:  m3u8, iptv, m3u
YouTube to m3u
Grab .m3u8 from YouTube live channels and makes .m3u IPTV Playlist from various languages and Events. Tamil / Malayalam / English / Hindi / French / Kids / Sports / Urudu etc.
Stars: ✭ 48 (-79.57%)
Mutual labels:  m3u8, iptv, m3u
YouTube to m3u
Grabs m3u from YouTube live.
Stars: ✭ 95 (-59.57%)
Mutual labels:  m3u8, iptv, m3u
IPtv
A collection of private IPtv list as well as Third-party IPtv list. (not updated anymore)
Stars: ✭ 16 (-93.19%)
Mutual labels:  m3u8, iptv, m3u
Tvlist Awesome M3u M3u8
直播源相关资源汇总 📺 💯 IPTV、M3U —— 勤洗手、戴口罩,祝愿所有人百毒不侵
Stars: ✭ 5,304 (+2157.02%)
Mutual labels:  m3u8, iptv, m3u
ustvgo to m3u
Grabs m3u links from ustvgo.tv
Stars: ✭ 35 (-85.11%)
Mutual labels:  m3u8, iptv, m3u
iptv-playlist-aggregator
Aggregator for IPTV playlists from multiple sources
Stars: ✭ 35 (-85.11%)
Mutual labels:  m3u8, iptv, m3u
iptv-m3u-player
项目iptv-m3u-maker衍生项目,利用已分析出的数据进行播放的桌面端app
Stars: ✭ 73 (-68.94%)
Mutual labels:  m3u8, iptv
megacubo
A intuitive, multi-language and cross-platform IPTV player. Available for Windows, Android, Linux & macOS.
Stars: ✭ 134 (-42.98%)
Mutual labels:  iptv, m3u
Iptv M3u Maker
IPTV 国内+国外 电视台直播源m3u文件, 收集&汇总&本地源脚本
Stars: ✭ 1,979 (+742.13%)
Mutual labels:  iptv, m3u
m3ufilter
ABANDONED - A tool that allows to filter specific items from an m3u filter designed for IPTV.
Stars: ✭ 46 (-80.43%)
Mutual labels:  m3u8, iptv
Ziliudi
IPTV自用直播源
Stars: ✭ 537 (+128.51%)
Mutual labels:  m3u8, iptv
m3u8
m3u8 file downloader library and chrome & firefox extensions/add-on's
Stars: ✭ 67 (-71.49%)
Mutual labels:  m3u8, m3u
Android P2p Engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 70 (-70.21%)
Mutual labels:  m3u8, iptv
Freeiptv
FreeIPTV • Watch Free IPTV World Wide
Stars: ✭ 68 (-71.06%)
Mutual labels:  m3u8, iptv
iptvtools
A set of scripts that help to better IPTV experience.
Stars: ✭ 103 (-56.17%)
Mutual labels:  iptv, m3u
Iptv
Collection of publicly available IPTV channels from all over the world
Stars: ✭ 45,053 (+19071.49%)
Mutual labels:  iptv, m3u
Ios P2p Engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 31 (-86.81%)
Mutual labels:  m3u8, iptv
Backoffice Administration
Stars: ✭ 89 (-62.13%)
Mutual labels:  m3u8, iptv
Iptv
Lista para IPTV abierto y colaborativo
Stars: ✭ 139 (-40.85%)
Mutual labels:  m3u8, iptv

Iptv Proxy

Actions Status

Description

Iptv-Proxy is a project to proxyfie an m3u file and to proxyfie an Xtream iptv service (client API).

M3U and M3U8

M3U service convert an iptv m3u file into a web proxy server.

It's transform all the original tracks to an new url pointing on the proxy.

Xtream code client api

proxy on Xtream code (client API)

support live, vod, series and full epg 🚀

M3u Example

Original iptv m3u file

#EXTM3U
#EXTINF:-1 tvg-ID="examplechanel1.com" tvg-name="chanel1" tvg-logo="http://ch.xyz/logo1.png" group-title="USA HD",CHANEL1-HD
http://iptvexample.net:1234/12/test/1
#EXTINF:-1 tvg-ID="examplechanel2.com" tvg-name="chanel2" tvg-logo="http://ch.xyz/logo2.png" group-title="USA HD",CHANEL2-HD
http://iptvexample.net:1234/13/test/2
#EXTINF:-1 tvg-ID="examplechanel3.com" tvg-name="chanel3" tvg-logo="http://ch.xyz/logo3.png" group-title="USA HD",CHANEL3-HD
http://iptvexample.net:1234/14/test/3
#EXTINF:-1 tvg-ID="examplechanel4.com" tvg-name="chanel4" tvg-logo="http://ch.xyz/logo4.png" group-title="USA HD",CHANEL4-HD
http://iptvexample.net:1234/15/test/4

What M3U proxy IPTV do

  • convert chanels url to new endpoints
  • convert original m3u file with new routes pointing to the proxy

Start proxy server example

iptv-proxy --m3u-url http://example.com/get.php?username=user&password=pass&type=m3u_plus&output=m3u8 \
             --port 8080 \
             --hostname proxyexample.com \
             --user test \
             --password passwordtest

That's give you an m3u file on a specific endpoint iptv.m3u in our example

http://proxyserver.com:8080/iptv.m3u?username=test&password=passwordtest

All the new routes pointing on your proxy server

#EXTM3U
#EXTINF:-1 tvg-ID="examplechanel1.com" tvg-name="chanel1" tvg-logo="http://ch.xyz/logo1.png" group-title="USA HD",CHANEL1-HD
http://proxyserver.com:8080/12/test/1?username=test&password=passwordtest
#EXTINF:-1 tvg-ID="examplechanel2.com" tvg-name="chanel2" tvg-logo="http://ch.xyz/logo2.png" group-title="USA HD",CHANEL2-HD
http://proxyserver.com:8080/13/test/2?username=test&password=passwordtest
#EXTINF:-1 tvg-ID="examplechanel3.com" tvg-name="chanel3" tvg-logo="http://ch.xyz/logo3.png" group-title="USA HD",CHANEL3-HD
http://proxyserver.com:8080/14/test/3?username=test&password=passwordtest
#EXTINF:-1 tvg-ID="examplechanel4.com" tvg-name="chanel4" tvg-logo="http://ch.xyz/logo4.png" group-title="USA HD",CHANEL4-HD
http://proxyserver.com:8080/15/test/4?username=test&password=passwordtest

M3u8 Example

The m3u8 feature is like m3u. The playlist should be in the m3u format and should contain all m3u8 tracks.

Sample of the original m3u file containing m3u8 track:

#EXTM3U
#EXTINF:-1 tvg-ID="examplechanel1.com" tvg-name="chanel1" tvg-logo="http://ch.xyz/logo1.png" group-title="USA HD",CHANEL1-HD
http://iptvexample.net:1234/12/test/1.m3u8
#EXTINF:-1 tvg-ID="examplechanel2.com" tvg-name="chanel2" tvg-logo="http://ch.xyz/logo2.png" group-title="USA HD",CHANEL2-HD
http://iptvexample.net:1234/13/test/2.m3u8

Xtream code client API example

% iptv-proxy --m3u-url http://example.com:1234/get.php?username=user&password=pass&type=m3u_plus&output=m3u8 \
             --port 8080 \
             --hostname proxyexample.com \
             ## put xtream flags if you want to add xtream proxy
             --xtream-user xtream_user \
             --xtream-password xtream_password \
             --xtream-base-url http://example.com:1234 \
             --user test \
             --password passwordtest
             

What Xtream proxy do

  • convert xtream xtream-user and xtream-password into new user and password
  • convert xtream-base-url with hostname and port

Original xtream credentials

user: xtream_user
password: xtream_password
base-url: http://example.com:1234

New xtream credentials

user: test
password: passwordtest
base-url: http://proxyexample.com:8080

All xtream live, streams, vod, series... are proxyfied!

You can get the m3u file with the original Xtream api request:

http://proxyexample.com:8080/get.php?username=test&password=passwordtest&type=m3u_plus&output=ts

Installation

Download lasted release

Or

% go install in root repository

With Docker

Prerequisite

  • Add an m3u URL in docker-compose.yml or add local file in iptv folder
  • HOSTNAME and PORT to expose
  • Expose same container port as the PORT ENV variable
 ports:
       # have to be the same as ENV variable PORT
      - 8080:8080
 environment:
      # if you are using m3u remote file
      # M3U_URL: http://example.com:1234/get.php?username=user&password=pass&type=m3u_plus&output=m3u8
      M3U_URL: /root/iptv/iptv.m3u
      # Port to expose the IPTVs endpoints
      PORT: 8080
      # Hostname or IP to expose the IPTVs endpoints (for machine not for docker)
      HOSTNAME: localhost
      GIN_MODE: release
      ## Xtream-code proxy configuration
      ## (put these env variables if you want to add xtream proxy)
      XTREAM_USER: xtream_user
      XTREAM_PASSWORD: xtream_password
      XTREAM_BASE_URL: "http://example.com:1234"
      USER: test
      PASSWORD: testpassword

Start

% docker-compose up -d

TLS - https with traefik

Put files and folders of ./traekik folder in root repo:

$ cp -r ./traekik/* .
$ mkdir config \
        && mkdir -p Traefik/etc/traefik \
        && mkdir -p Traefik/log

docker-compose sample with traefik:

version: "3"
services:
  iptv-proxy:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      # If your are using local m3u file instead of m3u remote file
      # put your m3u file in this folder
      - ./iptv:/root/iptv
    container_name: "iptv-proxy"
    restart: on-failure
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.iptv-proxy.rule=Host(`iptv.proxyexample.xyz`)"
      - "traefik.http.routers.iptv-proxy.entrypoints=websecure"
      - "traefik.http.routers.iptv-proxy.tls.certresolver=mydnschallenge"
      - "traefik.http.services.iptv-proxy.loadbalancer.server.port=8080"
    environment:
      # if you are using m3u remote file
      # M3U_URL: https://example.com/iptvfile.m3u
      M3U_URL: /root/iptv/iptv.m3u
      # Iptv-Proxy listening port
      PORT: 8080
      # Port to expose for Xtream or m3u file tracks endpoint
      ADVERTISED_PORT: 443
      # Hostname or IP to expose the IPTVs endpoints (for machine not for docker)
      HOSTNAME: iptv.proxyexample.xyz
      GIN_MODE: release
      # Inportant to activate https protocol on proxy links
      HTTPS: 1
      ## Xtream-code proxy configuration
      XTREAM_USER: xtream_user
      XTREAM_PASSWORD: xtream_password
      XTREAM_BASE_URL: "http://example.tv:1234"
      #will be used for m3u and xtream auth proxy
      USER: test
      PASSWORD: testpassword

  traefik:
    restart: always
    image: traefik:v2.4
    read_only: true
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./Traefik/traefik.yaml:/traefik.yaml:ro
      - ./Traefik/etc/traefik:/etc/traefik/
      - ./Traefik/log:/var/log/traefik/

Replace iptv.proxyexample.xyz in docker-compose.yml with your desired domain.

$ docker-compose up -d

TODO

there is basic auth just for testing. change with a real auth with database and user management and auth with token...

ENJOY!

Powered by

Grab me a beer 🍻

paypal

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].