PiRC

Check the web app

The web app at app.pirc.dev holds your browser's keys, so its code matters as much as the apps'. You don't have to take it on trust: what it serves is the build of a signed PiRC release, and you can rebuild it and compare.

What the site serves

app.pirc.dev serves static files and nothing else: no server of ours runs code for the page, and the page talks to the relay directly with your browser's keys. Every file is built from a release tag of PiRC's public repository, signed by its author. /version.txt names the release.

The build is reproducible: the same tag gives the same files, byte for byte, on any machine.

What the site adds

These belong to the site rather than to the build, and are the only things that differ from it:

  • /hosted.json names the relay a new browser joins, such as wss://relay.pirc.dev.
  • /SHA256SUMS lists the SHA-256 of every file the site serves for that release, hosted.json included.
  • The page's HTTP headers. The build allows the page to connect to any secure WebSocket; the site narrows that to its relays alone. The rest of the Content Security Policy is the build's, word for word.

How to check it

You need git, Node 24 with corepack, and Go. This checks the release tag's signature against the keys listed in the repository's allowed_signers, builds the page from that tag, then fetches every file from the site and compares it with the build:

site=https://app.pirc.dev
version=$(curl -sf "$site/version.txt")
git clone -q https://github.com/pirc-dev/pirc && cd pirc
git -c gpg.ssh.allowedSignersFile=allowed_signers verify-tag "v$version"
git checkout -q "v$version"
corepack pnpm install --frozen-lockfile && sh/generate.sh
sh/build.sh web-hosted ../page && cd ../page
find . -type f ! -name _headers | sort | while read -r f; do
  if curl -sfL "$site/${f#./}" | cmp -s - "$f"; then echo "same       $f"; else echo "DIFFERENT  $f"; fi
done
curl -sI "$site/" | grep -i '^content-security-policy'
grep -i 'content-security-policy' _headers

Every line should say same. The last two lines show the site's Content Security Policy and the build's: they differ only in connect-src, which names the relay. SECURITY.md says more about checking releases and how to report a problem, and How PiRC's hosted relay keeps your sessions private explains what the keys protect.

Or check the build against the site's list of checksums. Still in ../page, this should print OK for every file; hosted.json is the site's own, so it is not in the build:

curl -sf "$site/SHA256SUMS" > ../SHA256SUMS
shasum -a 256 --ignore-missing -c ../SHA256SUMS

What this does not cover

A check shows what the site served you at that moment. A browser loads the page again on each visit, so a changed site would serve changed code. The page's policy keeps it from loading code from anywhere else, and every release is public, so a change to the site can be seen by anyone who checks.