{"id":13548523,"url":"https://github.com/pierre-emmanuelJ/iptv-proxy","last_synced_at":"2025-04-02T21:31:44.456Z","repository":{"id":39579206,"uuid":"172750054","full_name":"pierre-emmanuelJ/iptv-proxy","owner":"pierre-emmanuelJ","description":"Reverse proxy on iptv m3u and m3u8 file and xtream codes client api","archived":false,"fork":false,"pushed_at":"2024-01-12T21:42:52.000Z","size":9809,"stargazers_count":581,"open_issues_count":66,"forks_count":168,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-03-28T07:02:20.543Z","etag":null,"topics":["docker","docker-compose","go","golang","iptv","iptv-proxy","iptv-smarter","m3u","m3u-proxy","m3u8","proxy","xtream","xtream-codes","xtream-proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pierre-emmanuelJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-26T16:39:35.000Z","updated_at":"2025-03-21T11:48:22.000Z","dependencies_parsed_at":"2024-01-13T16:22:27.302Z","dependency_job_id":"ce7d094b-b53a-4426-b423-9a4e98c83424","html_url":"https://github.com/pierre-emmanuelJ/iptv-proxy","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierre-emmanuelJ%2Fiptv-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierre-emmanuelJ%2Fiptv-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierre-emmanuelJ%2Fiptv-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierre-emmanuelJ%2Fiptv-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierre-emmanuelJ","download_url":"https://codeload.github.com/pierre-emmanuelJ/iptv-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246895798,"owners_count":20851329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","go","golang","iptv","iptv-proxy","iptv-smarter","m3u","m3u-proxy","m3u8","proxy","xtream","xtream-codes","xtream-proxy"],"created_at":"2024-08-01T12:01:11.478Z","updated_at":"2025-04-02T21:31:42.426Z","avatar_url":"https://github.com/pierre-emmanuelJ.png","language":"Go","funding_links":["https://www.paypal.com/donate?hosted_button_id=WQAAMQWJPKHUN"],"categories":["Go"],"sub_categories":[],"readme":"# Iptv Proxy\n\n[![Actions Status](https://github.com/pierre-emmanuelJ/iptv-proxy/workflows/CI/badge.svg)](https://github.com/pierre-emmanuelJ/iptv-proxy/actions?query=workflow%3ACI)\n\n## Description\n\nIptv-Proxy is a project to proxyfie an m3u file\nand to proxyfie an Xtream iptv service (client API).\n\n### M3U and M3U8\n\nM3U service convert an iptv m3u file into a web proxy server.\n\nIt's transform all the original tracks to an new url pointing on the proxy.\n\n\n### Xtream code client api\n\nproxy on Xtream code (client API)\n\nsupport live, vod, series and full epg :rocket:\n\n### M3u Example\n\nOriginal iptv m3u file\n\n```m3u\n#EXTM3U\n#EXTINF:-1 tvg-ID=\"examplechanel1.com\" tvg-name=\"chanel1\" tvg-logo=\"http://ch.xyz/logo1.png\" group-title=\"USA HD\",CHANEL1-HD\nhttp://iptvexample.net:1234/12/test/1\n#EXTINF:-1 tvg-ID=\"examplechanel2.com\" tvg-name=\"chanel2\" tvg-logo=\"http://ch.xyz/logo2.png\" group-title=\"USA HD\",CHANEL2-HD\nhttp://iptvexample.net:1234/13/test/2\n#EXTINF:-1 tvg-ID=\"examplechanel3.com\" tvg-name=\"chanel3\" tvg-logo=\"http://ch.xyz/logo3.png\" group-title=\"USA HD\",CHANEL3-HD\nhttp://iptvexample.net:1234/14/test/3\n#EXTINF:-1 tvg-ID=\"examplechanel4.com\" tvg-name=\"chanel4\" tvg-logo=\"http://ch.xyz/logo4.png\" group-title=\"USA HD\",CHANEL4-HD\nhttp://iptvexample.net:1234/15/test/4\n```\n\nWhat M3U proxy IPTV do\n - convert chanels url to new endpoints\n - convert original m3u file with new routes pointing to the proxy\n\nStart proxy server example\n\n```Bash\niptv-proxy --m3u-url http://example.com/get.php?username=user\u0026password=pass\u0026type=m3u_plus\u0026output=m3u8 \\\n             --port 8080 \\\n             --hostname proxyexample.com \\\n             --user test \\\n             --password passwordtest\n```\n\n\n That's give you an m3u file on a specific endpoint `iptv.m3u` in our example\n \n `http://proxyserver.com:8080/iptv.m3u?username=test\u0026password=passwordtest`\n\nAll the new routes pointing on your proxy server\n```m3u\n#EXTM3U\n#EXTINF:-1 tvg-ID=\"examplechanel1.com\" tvg-name=\"chanel1\" tvg-logo=\"http://ch.xyz/logo1.png\" group-title=\"USA HD\",CHANEL1-HD\nhttp://proxyserver.com:8080/12/test/1?username=test\u0026password=passwordtest\n#EXTINF:-1 tvg-ID=\"examplechanel2.com\" tvg-name=\"chanel2\" tvg-logo=\"http://ch.xyz/logo2.png\" group-title=\"USA HD\",CHANEL2-HD\nhttp://proxyserver.com:8080/13/test/2?username=test\u0026password=passwordtest\n#EXTINF:-1 tvg-ID=\"examplechanel3.com\" tvg-name=\"chanel3\" tvg-logo=\"http://ch.xyz/logo3.png\" group-title=\"USA HD\",CHANEL3-HD\nhttp://proxyserver.com:8080/14/test/3?username=test\u0026password=passwordtest\n#EXTINF:-1 tvg-ID=\"examplechanel4.com\" tvg-name=\"chanel4\" tvg-logo=\"http://ch.xyz/logo4.png\" group-title=\"USA HD\",CHANEL4-HD\nhttp://proxyserver.com:8080/15/test/4?username=test\u0026password=passwordtest\n```\n\n### M3u8 Example\n\nThe m3u8 feature is like m3u.\nThe playlist should be in the m3u format and should contain all m3u8 tracks.\n\nSample of the original m3u file containing m3u8 track:\n```Shell\n#EXTM3U\n#EXTINF:-1 tvg-ID=\"examplechanel1.com\" tvg-name=\"chanel1\" tvg-logo=\"http://ch.xyz/logo1.png\" group-title=\"USA HD\",CHANEL1-HD\nhttp://iptvexample.net:1234/12/test/1.m3u8\n#EXTINF:-1 tvg-ID=\"examplechanel2.com\" tvg-name=\"chanel2\" tvg-logo=\"http://ch.xyz/logo2.png\" group-title=\"USA HD\",CHANEL2-HD\nhttp://iptvexample.net:1234/13/test/2.m3u8\n```\n\n### Xtream code client API example\n\n```Bash\n% iptv-proxy --m3u-url http://example.com:1234/get.php?username=user\u0026password=pass\u0026type=m3u_plus\u0026output=m3u8 \\\n             --port 8080 \\\n             --hostname proxyexample.com \\\n             ## put xtream flags if you want to add xtream proxy\n             --xtream-user xtream_user \\\n             --xtream-password xtream_password \\\n             --xtream-base-url http://example.com:1234 \\\n             --user test \\\n             --password passwordtest\n             \n```\n\nWhat Xtream proxy do\n\n - convert xtream `xtream-user ` and `xtream-password` into new `user` and `password`\n - convert `xtream-base-url` with `hostname` and `port`\n \nOriginal xtream credentials\n \n ```\n user: xtream_user\n password: xtream_password\n base-url: http://example.com:1234\n ```\n \nNew xtream credentials\n\n ```\n user: test\n password: passwordtest\n base-url: http://proxyexample.com:8080\n ```\n \n All xtream live, streams, vod, series... are proxyfied! \n \n \n You can get the m3u file with the original Xtream api request:\n ```\n http://proxyexample.com:8080/get.php?username=test\u0026password=passwordtest\u0026type=m3u_plus\u0026output=ts\n ```\n\n\n## Installation\n\nDownload lasted [release](https://github.com/pierre-emmanuelJ/iptv-proxy/releases)\n\nOr\n\n`% go install` in root repository\n\n## With Docker\n\n### Prerequisite\n\n - Add an m3u URL in `docker-compose.yml` or add local file in `iptv` folder\n - `HOSTNAME` and `PORT` to expose\n - Expose same container port as the `PORT` ENV variable \n\n```Yaml\n ports:\n       # have to be the same as ENV variable PORT\n      - 8080:8080\n environment:\n      # if you are using m3u remote file\n      # M3U_URL: http://example.com:1234/get.php?username=user\u0026password=pass\u0026type=m3u_plus\u0026output=m3u8\n      M3U_URL: /root/iptv/iptv.m3u\n      # Port to expose the IPTVs endpoints\n      PORT: 8080\n      # Hostname or IP to expose the IPTVs endpoints (for machine not for docker)\n      HOSTNAME: localhost\n      GIN_MODE: release\n      ## Xtream-code proxy configuration\n      ## (put these env variables if you want to add xtream proxy)\n      XTREAM_USER: xtream_user\n      XTREAM_PASSWORD: xtream_password\n      XTREAM_BASE_URL: \"http://example.com:1234\"\n      USER: test\n      PASSWORD: testpassword\n```\n\n### Start\n\n```\n% docker-compose up -d\n```\n\n## TLS - https with traefik\n\nPut files and folders of `./traekik` folder in root repo:\n```Shell\n$ cp -r ./traekik/* .\n```\n\n```Shell\n$ mkdir config \\\n        \u0026\u0026 mkdir -p Traefik/etc/traefik \\\n        \u0026\u0026 mkdir -p Traefik/log\n```\n\n\n`docker-compose` sample with traefik:\n```Yaml\nversion: \"3\"\nservices:\n  iptv-proxy:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    volumes:\n      # If your are using local m3u file instead of m3u remote file\n      # put your m3u file in this folder\n      - ./iptv:/root/iptv\n    container_name: \"iptv-proxy\"\n    restart: on-failure\n    labels:\n      - \"traefik.enable=true\"\n      - \"traefik.http.routers.iptv-proxy.rule=Host(`iptv.proxyexample.xyz`)\"\n      - \"traefik.http.routers.iptv-proxy.entrypoints=websecure\"\n      - \"traefik.http.routers.iptv-proxy.tls.certresolver=mydnschallenge\"\n      - \"traefik.http.services.iptv-proxy.loadbalancer.server.port=8080\"\n    environment:\n      # if you are using m3u remote file\n      # M3U_URL: https://example.com/iptvfile.m3u\n      M3U_URL: /root/iptv/iptv.m3u\n      # Iptv-Proxy listening port\n      PORT: 8080\n      # Port to expose for Xtream or m3u file tracks endpoint\n      ADVERTISED_PORT: 443\n      # Hostname or IP to expose the IPTVs endpoints (for machine not for docker)\n      HOSTNAME: iptv.proxyexample.xyz\n      GIN_MODE: release\n      # Inportant to activate https protocol on proxy links\n      HTTPS: 1\n      ## Xtream-code proxy configuration\n      XTREAM_USER: xtream_user\n      XTREAM_PASSWORD: xtream_password\n      XTREAM_BASE_URL: \"http://example.tv:1234\"\n      #will be used for m3u and xtream auth proxy\n      USER: test\n      PASSWORD: testpassword\n\n  traefik:\n    restart: always\n    image: traefik:v2.4\n    read_only: true\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n      - ./Traefik/traefik.yaml:/traefik.yaml:ro\n      - ./Traefik/etc/traefik:/etc/traefik/\n      - ./Traefik/log:/var/log/traefik/\n```\n\nReplace `iptv.proxyexample.xyz` in `docker-compose.yml` with your desired domain.\n\n```Shell\n$ docker-compose up -d\n```\n\n## TODO\n\nthere is basic auth just for testing.\nchange with a real auth with database and user management\nand auth with token...\n\n**ENJOY!**\n\n## Powered by\n\n- [cobra](https://github.com/spf13/cobra)\n- [go.xtream-codes](https://github.com/tellytv/go.xtream-codes)\n- [gin](https://github.com/gin-gonic/gin)\n\nGrab me a beer 🍻\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate?hosted_button_id=WQAAMQWJPKHUN)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierre-emmanuelJ%2Fiptv-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierre-emmanuelJ%2Fiptv-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierre-emmanuelJ%2Fiptv-proxy/lists"}