Apps
Extension#
Routes the source requests P-Stream makes through your own browser instead of a shared server — your IP, your headers, your cookies. That is exactly what the sources which refuse a server want to see, so more of them work, and the ones that already worked tend to load faster.
Install#
Any Chromium browser, or Firefox 128+ — desktop or android. Edge installs from the Chrome Web Store, but asks you to allow extensions from other stores the first time.
Once it's installed, open setup — or Settings → Connections — and run through it once. The site it was built for is enabled out of the box; any other domain you allow yourself with the power button in the extension's popup.
Build it yourself#
Build from source to run a version the stores don't have.
Node.js 22+ and pnpm 10+. Older pnpm fails on the workspace file with
packages field missing or empty.
Install and build:
pnpm install
pnpm build # chromium -> build/chrome-ps-prod
pnpm build:firefox # firefox -> build/firefox-ps-prodOr produce installable artifacts:
pnpm package # .zip
pnpm package:firefox # .xpiChromium — open chrome://extensions, turn on Developer mode, Load
unpacked, and pick build/chrome-ps-prod.
Firefox — install the .xpi. Release builds refuse unsigned
extensions, so use Developer Edition or Nightly, or sign it.
For a live-reloading dev build, pnpm dev writes to build/chrome-ps-dev.
Source: https://codeberg.org/pee/extension
What it can do#
The site sends one of four messages and the extension answers it. That is the whole surface.
| Message | What it's for |
|---|---|
hello | Handshake — its version, and whether you've granted this site access |
makeRequest | Perform one request with real headers and cookies, and hand back the result |
prepareStream | Set up header rewriting for a host before playback, so the player's own segment requests carry what the source expects |
openPage | Open the extension's own permission prompt |
These four shapes live in src/types/protocol.ts. That file is the contract
the userscript and the desktop app implement too, so it is the one place to
change if the protocol changes.
Permissions#
| Permission | Why |
|---|---|
declarativeNetRequest | Rewrite request and response headers for the hosts a source needs |
cookies | Send cookies for the few hosts that gate playback behind one |
activeTab | Identify which tab a message came from |
storage | Remember which domains you allowed |
<all_urls> | Optional — requested only when you grant it, used only for the requests above |
<all_urls> is optional at install time: nothing works until you grant it, and
it is used solely for requests the site asks for. Only the response headers
involved in CORS, CSP and content-disposition can be rewritten, and that list
is fixed in protocol.ts — a page cannot extend it.
It acts only on domains in its list and does nothing on any other page. It has no server of its own to send anything to.
Alternatives#
- Desktop app — has all of this built in and needs no extension. The best option on a computer.
- Userscript — same mechanism through a userscript manager, slightly less capable.
- On iOS, extensions aren't available at all. Run your own proxy instead.