A lightweight M3U8 proxy for Express and Cloudflare Workers. Handles Referer, Origin, and User-Agent headers to bypass restrictions.
- Configure: Edit
ALLOWED_ORIGINSinwrangler.toml. Other settings can be modified incf_worker.js. - Deploy:
npx wrangler deploy
- Install:
npm install - Run:
npm start(Default port:3000) - Config: Edit
.envorconfig.js.
Endpoint: GET /m3u8-proxy?url=<TARGET_URL>&headers=<JSON_STRING>
Example:
https://your-proxy.com/m3u8-proxy?url=https://example.com/video.m3u8
url: The M3U8/segment URL to proxy.headers(optional): JSON-encoded headers (e.g.,{"Referer": "https://site.com"}).
Playground (Express Only): Access GET / in your browser.