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#

RouteWhat it does
/Fetches ?url= for the browser
/streamPlays a video stream through the proxy
/fragmentVideo segments for /stream
/cacheShares links that were already found
/qualityRemembers the best quality seen per source
/healthStatus and uptime

Next: deploy it.