Proxy

Deploying the proxy#

You need Node.js 22+ and pnpm, or Docker. Nothing else — there is no database and no required configuration.

If you just want more sources and aren't set on running a server, install the extension instead. It does the same job with no hosting.

Get the code#

Clone it: git clone https://codeberg.org/pee/proxy

Enter the directory: cd proxy

docker compose up -d

Or without compose:

docker build -t pstream-proxy .
docker run -d -p 3000:3000 --env-file .env pstream-proxy

Node#

pnpm install
pnpm build:node
pnpm start

Other platforms#

The proxy is built with Nitro, so it targets several runtimes out of the box.

pnpm build:cloudflare  && npx wrangler deploy          # Cloudflare Workers
pnpm build:netlify     && npx netlify deploy --prod    # Netlify Edge
pnpm build:aws                                         # AWS Lambda (.output/server)

These build and deploy without complaint, and are still the wrong answer for this workload — see the IP-blocking note on the introduction page. Use them only if you already know the sources you care about accept them.

Check it works#

curl http://localhost:3000/health

You should get {"status":"ok",...}.

Point P-Stream at it#

Put it behind HTTPS first — a browser on an https:// page will refuse to call an http:// proxy.

Then on pstream.cfd:

Open Settings → Connections.
Turn on Use custom proxy workers.
Press Add new worker and paste the URL in.

Add several and they're used in turn. The Setup card at the top of that same page tests the first one and turns Custom proxy green when it answers like a proxy — if it stays red, something in front of it is returning a website where a proxy was expected.

Proxy TMDB, below the worker list, sends title searches and artwork through your proxy too. Only needed if you can't reach TheMovieDB directly, such as if your ISP blocks it — it adds a hop to every request, so turn off the Discover section as well if you use it.