gitmyhub

iptv-proxy

Go ★ 0 updated 27d ago

简单IPTV直播反向代理

A minimal Go reverse proxy that forwards IPTV live stream requests to an upstream source with immediate, unbuffered writes to keep latency low.

Gosetup: easycomplexity 2/5

iptv-proxy is a small, minimal reverse proxy written in Go for forwarding IPTV live stream requests. It listens on a local address and port, and forwards any incoming request straight through to an upstream IPTV source, keeping the original path and query string unchanged and only swapping out the destination host.

The README, written in Chinese, describes the tool as suited for local or router based forwarding of an internet provider's multicast or unicast streaming source. It is built on Go's standard library reverse proxy, with one specific setting turned on: the flush interval is set so that every write to the client happens immediately rather than being buffered, which keeps a live stream's latency low and prevents data from building up unsent.

To use it, a person downloads a prebuilt binary for Linux (amd64 or arm64) from the project's releases, or compiles it themselves with Go 1.26 or newer. Running it takes two command line flags: one for the local address and port to listen on, and one for the address and port of the actual upstream IPTV source, which the user must supply themselves. Once running, a media player is pointed at the local listening address instead of the original source, using the same path structure as before.

The repository also includes an equivalent nginx configuration file as a reference, for anyone who would rather run the same forwarding behavior through nginx, including handling of redirect responses. The project notes it was built with help from Claude Code.

Where it fits