Proxy
The proxy#
The proxy is a small stateless service that fetches a URL on the server's behalf and hands the response back with permissive CORS headers, so your browser can play a stream from a CDN that would otherwise refuse it.
It stores nothing, needs no database, and runs with an empty config file.
Do I need one?#
Only if you want your own. P-Stream ships with a shared one, and the extension replaces it entirely — if you use the extension, a proxy adds nothing.
The two reasons to run your own:
- iOS. Extensions aren't available, so a proxy is the only way to get off the shared default.
- A shared IP is a rate-limited IP. Streaming sites throttle by address. Your own instance is used by you alone.
Host it somewhere with a residential or plain VPS address. Many streaming sites block the IP ranges of Cloudflare, Netlify and other serverless platforms. The proxy runs there, but finds fewer sources.
What it exposes#
| Route | What it does |
|---|---|
/ | Fetches ?url= for the browser |
/stream | Plays a video stream through the proxy |
/fragment | Video segments for /stream |
/cache | Shares links that were already found |
/quality | Remembers the best quality seen per source |
/health | Status and uptime |
Next: deploy it.