A high-performance proxy server for streaming media, supporting HTTP(S), HLS, and MPEG-DASH with real-time DRM decryption, acestream, xtreamcode proxy https://mhdzumair.github.io/mediaflow-proxy/
  • Python 80%
  • HTML 16.7%
  • JavaScript 2.9%
  • Makefile 0.2%
  • Dockerfile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Aroh Maurya 99f4af1153
fix: resolve hostnames before checking for private/internal addresses (#286)
The SSRF guard on /proxy/forward only checked whether the hostname was
already a numeric IP literal. A hostname that resolves to a private,
loopback, or link-local address (like *.nip.io mapping straight to an
IP) walked right through the try/except and was never checked, since
DNS resolution never happened.

/proxy/stream had no guard at all, so any destination reached it
unchecked.

Both now resolve the hostname first and check every address it
resolves to. Numeric IP literals skip the DNS lookup and are checked
directly, same as before. The allowlist, denylist, and scheme checks
on /forward are unchanged.

Left the HLS, MPD, and transcode endpoints out of this PR. Some of
them pull in URLs parsed out of manifest content rather than a single
query param, which is a different problem from what's fixed here and
needs its own look.

Added tests that hit the guard directly: a private IP literal, a
hostname that resolves to loopback (localhost), a normal public host,
and the full /forward check with the hostname bypass. Confirmed the
private-IP-literal-only version lets a real nip.io hostname through
unblocked, and the fixed version rejects it.
2026-09-06 05:45:13 +05:30
.github Enhance GitHub Actions workflow and update playlist builder API 2026-04-22 19:51:02 +05:30
docs Allows selecting the audio language in the MPD manifest proxy. (#283) 2026-09-06 05:43:30 +05:30
mediaflow_proxy fix: resolve hostnames before checking for private/internal addresses (#286) 2026-09-06 05:45:13 +05:30
tests fix: resolve hostnames before checking for private/internal addresses (#286) 2026-09-06 05:45:13 +05:30
.dockerignore Add Acestream proxy support 2026-01-20 18:24:31 +05:30
.gitignore Add pure Python fMP4-to-MPEG-TS remuxer (#227) 2026-02-10 20:14:42 +05:30
docker-compose.portainer Fix DLHD | + Vavoo support | + Playlist Builder | + Pre-Buffer System And other sfuff (#125) 2025-08-17 21:46:29 +05:30
docker-compose.yml Add Redis support for rate limiting and caching & handle rate limit extractor & extractor extension endpoint support (#226) 2026-02-08 01:48:07 +05:30
Dockerfile Enhance Docker and Gunicorn configuration in Dockerfile and heroku.yml 2026-03-22 23:38:19 +05:30
heroku.yml Enhance Docker and Gunicorn configuration in Dockerfile and heroku.yml 2026-03-22 23:38:19 +05:30
LICENSE Release MediaFlow Proxy 2024-08-24 23:38:20 +05:30
Makefile fix release note 2026-02-21 14:35:18 +05:30
mkdocs.yml docs: add forward proxy to mkdocs nav 2026-05-19 10:28:05 +05:30
pyproject.toml feat(maxstream): full uprot.net bypass pipeline (CB01 / EuroStreaming fix) (#275) 2026-05-09 11:14:04 +05:30
README.md docs(readme): standardize ElfHosted links and add managed deployment option (#269) 2026-05-01 21:55:16 +05:30
uv.lock Added StreamHG extractor (#279) 2026-05-17 21:50:27 +05:30

MediaFlow Proxy

MediaFlow Proxy Logo

MediaFlow Proxy is a streaming proxy for HTTP(S), HLS (M3U8), and MPEG-DASH—including ClearKey DRM and real-time DASH-to-HLS conversion. It also supports IPTV (Xtream Codes), Acestream, Telegram media, transcoding, and advanced routing.

Full documentation: mhdzumair.github.io/mediaflow-proxy (built from the docs/ folder with MkDocs Material).

Quick start

docker run -p 8888:8888 -e API_PASSWORD=your_password mhdzumair/mediaflow-proxy

Prefer not to self-host? A managed MediaFlow Proxy instance is available via ElfHosted, bundled with debrid and Stremio addons in their streaming personal-stacks (7-day trial).

Highlights

  • DASH (ClearKey) to HLS, HLS manipulation, generic HTTP(S) proxy with custom headers
  • Xtream Codes API proxy, Acestream, Telegram (MTProto) streaming
  • Optional GPU transcoding (fMP4 H.264/AAC), pre-buffering, segment skip, stream transformers
  • Redis-backed rate limiting, encrypted URL generation, reverse-proxyfriendly forwarded headers

Docs and source

Resource Link
User & operator manual Documentation site
Markdown sources docs/ in this repository
Build docs locally uv sync --group docs then uv run mkdocs serve

High-throughput alternative

For lower memory usage and higher throughput — especially on constrained hardware (small VPS, NAS, Raspberry Pi) — see MediaFlow Proxy Light, a Rust reimplementation that is fully API-compatible with this proxy. Benchmarks show 78× less memory, 1.73.4× less CPU per request, and up to 4× higher throughput. Existing tokens, encrypted URLs, and client integrations work without changes.

Contributing

Contributions are welcome! see Contributing in the docs and open a Pull Request on GitHub.

License

MIT License

Disclaimer

This project is for educational purposes only. The developers of MediaFlow Proxy are not responsible for any misuse of this software. Please ensure that you have the necessary permissions to access and use the media streams you are proxying.