Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

iptv-proxy

> DevOps
Open source

Reverse proxy on iptv m3u and m3u8 file and xtream codes client api

708 stars0 likes12 views
WebsiteGitHub

About

Reverse proxy on iptv m3u and m3u8 file and xtream codes client api

Iptv Proxy

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 :rocket:

M3u Example

Original iptv m3u file

…

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

bash
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

…

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:

bash
#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

bash
% 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
…

Start

% docker-compose up -d

TLS - https with traefik

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

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

docker-compose sample with traefik:

…

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

bash
$ 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

  • cobra
  • go.xtream-codes
  • gin

Grab me a beer

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Godockerdocker-composegogolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理