{"repo":"pcruz1905/hls-restream-proxy","free":true,"listed":false,"github":"https://github.com/pcruz1905/hls-restream-proxy","clone":"git clone https://github.com/pcruz1905/hls-restream-proxy.git","description":"Lightweight HLS restream proxy for Jellyfin/Emby/Plex — injects headers, rewrites playlists, auto-refreshes tokens","language":"Python","stars":242,"topics":["hls","iptv","jellyfin","proxy","m3u","streaming","selfhosted","emby","plex","restream"],"license":"MIT","category":"networking-infra","readme_excerpt":"hls-restream-proxy Lightweight HLS restream toolkit for self-hosted media servers. Many free IPTV/HLS sources require specific HTTP headers (User-Agent, Referer) that media servers don't send. This proxy sits between your media server and the upstream, injecting the required headers and rewriting m3u8 playlists so all segment requests also go through the proxy. Components File Purpose ------ --------- hls-proxy.py HTTP reverse proxy that adds headers to upstream HLS requests refresh-m3u.sh Scrapes source pages, extracts m3u8 URLs, writes M3U playlist detect-headers.sh Auto-detects which HTTP headers a stream requires channels.conf Your channel list (slug, name, logo, group, source URL) How it works 1. refresh-m3u.sh generates an M3U file with stable /channel/ URLs pointing to the proxy 2. When Jellyfin requests /channel/sporttv1 , the proxy scrapes a fresh m3u8 URL on the fly (cached for 1 hour) 3. The proxy injects the required headers and rewrites the playlist so .ts segments also go through it 4. The proxy auto-learns the correct Referer for each upstream host — no manual configuration needed No more expired tokens — the M3U URLs never change, the proxy handles token refresh transparently. Requirements - Python 3.8+ (stdlib only, no pip packages) - bash, curl, grep (with PCRE / -P ) Quick start Docker (recommended) Docker one-liner (no clone) Manual (no Docker) Channel config format channels.conf — one channel per line, pipe-delimited: - mode : iframe (default) — page has ","default_branch":null,"files":null,"tree":[],"storefront":"/r/pcruz1905","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pcruz1905/hls-restream-proxy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}