Skip to content

v0.9.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 24 Nov 01:31
· 33 commits to main since this release
Immutable release. Only release title and notes can be modified.
9da23ab

Summary: Sign-in passes can now gate who connects (with C and desktop-app clients that send them) and a relay stream ends when its pass stops; a log limit keeps a flood of refused clients out of the log; new docs for hosting on the internet (a public compose file), the wire protocol, a client quick start and the exact pass format with shared test vectors.

Pre-release: this is a 0.x version and may change without notice.

Added

  • Docker: docker/docker-compose.public.yml, a compose file for a host who exposes their own server to the internet, and docs/public-compose.md, which says why each setting is there and what the file leaves out. It runs as user 10001 with no capabilities, no new privileges, a read-only root, memory, CPU, process and file limits, a health check on /healthz, rotated JSON logs, the status page on localhost with a token from an env file, and the relay, discovery and Medius off. A commented block turns on sign-in passes for a host with their own login service.
  • Clients: a build and install path for the C client and a single-file Python client. make -C client PREFIX=... install installs a static libpsnr.a, the headers and a psnr.pc; client/CMakeLists.txt provides psnr::psnr and a find_package(psnr) config. client/python/psnr_client.py (standard library only) covers HELLO, heartbeat, GET_CAPS, rooms, room data and messages, kick and scores, with loopback tests run in CI. The C sources and headers are unchanged. See the client quick start.
  • Docs and tooling: the README shows seven status badges (server, relay, sign-in passes, C client, desktop app, LAN discovery, admin API) in the site's colours, each linking to its table in the features list. tools/badges.py generates them in docs/img/badges/ from the status words in docs/features.tsv (the weakest row of a component decides), and CI checks them with --check. A badge shows only that status word; "available" means merged with a test or a recorded run, not tried with a game.
  • Server: optional sign-in passes for the relay. With -pass-key-file, -pass-issuer, -pass-audience and -require-pass relay, the relay carries streams and datagrams only between players who both hold a short-lived pass (Ed25519, checked offline, valid for at most an hour plus 60 s of clock skew) signed by a login service the host trusts. New request AUTH (0x05), ERROR 10, GET_CAPS bit 7, the relay_no_pass drop counter, -pass-revoked-file and -pass-max-conns-per-sub. Off by default: a server without these settings behaves as before. No login service or client exists yet, and players' names are still unauthenticated. See Sign-in passes.
  • Server: optional -require-pass connect, with -pass-max-unauth-conns (default 64) and -pass-max-unauth-per-addr (default 4). A connection becomes a player only when AUTH accepts a pass with the connect scope: until then HELLO is only parked (no name reserved, no UDP token, not listed), every request but AUTH, HEARTBEAT and the pass bit of GET_CAPS gets ERROR 10, and the connection is closed 30 s after accept if it has not signed in (HEARTBEAT does not extend this; a frame before AUTH is at most 2055 bytes). HELLO_ACK flag bit 3 hints that a pass is needed; OK to AUTH carries the UDP token in this mode; the connection is closed 60 s after the pass expires unless a refresh AUTH arrived. Off by default: a server without these settings behaves as before. Passes bound to a client key are not built, no login service or client sends AUTH yet, and players' names are still unauthenticated. A client that predates AUTH is refused on purpose under this setting. See Connect mode.
  • Docs: docs/public-server.md: recommended settings for a server that the internet can reach. What you take on (no authentication, no flood protection, no TLS, no moderation tool), a table of each relevant setting with a value and a reason, the relay and its unlimited bandwidth, which ports to publish, running as an unprivileged service, what to watch in /api/stats, and what to tell players. It says no public instance exists.
  • Clients: AUTH from the C client and the desktop app's Go client. C: psnr_auth(c, pass, len, timeout_ms) sends AUTH (version 1) with an opaque pass of 1 to 2048 bytes and returns 0 or the ERROR code (10 pass refused or needed, 8 name taken, 1 from a server with no pass settings), plus PSNR_AUTH, PSNR_E_PASS, PSNR_CAP_PASS_RELAY, PSNR_PASS_MAX and psnr_pass_hint (HELLO_ACK flag bit 3). Go: Conn.Auth, ErrPass, HelloAck.PassRequired. An empty or oversize pass is refused before anything is sent; the UDP token in an OK under -require-pass connect replaces the HELLO token. The clients never fetch, store, parse, check or log a pass; they send what they are given. No login service exists yet, so nothing but a test key can mint a pass, and the desktop app has no sign-in screen. Tested on Linux against the real server (TestCClientAuth, TestAuth*). See Sending a pass from a client.
  • Docs and tests: the sign-in pass format is written down exactly in docs/api.md (text, base64url without padding, the 2048-byte limit, Ed25519 over the text as sent, integer numbers, the eight fields and the ninth name cnf that is always refused, the 60 s skew), with a plain statement of what the server does today: key names are matched without regard to case, when a key is repeated the last one wins, and a null or missing iat is read as 0. Nothing in the server changes. server/testdata/pass_vectors.jsonl holds over a hundred passes, valid and invalid, made with a throwaway test-only key, and TestPassVectors runs every one against the server's check. docs/running.md has a section for hosts that use passes: rotating the key, clocks, where a refusal reason is logged and how to tell that a SIGHUP reload failed.

Changed

  • Server: a client that is not a player yet can no longer fill the log with warn lines. Each kind (message and reason) of these is written at most once a second, ending in skipped_since_last_line=N for the lines of that kind left out since the previous one, and a kind that stops with lines left out reports them in a log lines left out line a second later and at shutdown. The kinds: a connection refused for the per-address, total or not-signed-in limit (these two used refused_since_last_line before) or for no valid PROXY header, a HELLO refused for a taken name, and, under -require-pass connect, a pass refused and a connection closed for refused passes, for no sign-in in time, for a frame too long before sign-in or for its request rate before sign-in. Without -require-pass connect a connection has no sign-in state, so its request-rate close is still always logged and its connect, HELLO and close lines are bounded only by the per-address limit. A disconnect or failed read of a connection that never became a player (HELLO accepted, or AUTH accepted in connect mode) is logged at debug instead of info. Lines about players are unchanged, and no flag, wire message or fail2ban filter changes. The /api/stats counters are unchanged too: only the tcp_refusals counters (conns, conns_per_addr, req_rate) count refusals, so the other events are counted by the skipped_since_last_line numbers. See Logging.
  • Docs: docs/protocol.md, a protocol specification: byte layouts for every TCP frame and UDP packet, the connection state machine, the order of checks and the error code each request can return, limits, versioning rules, security notes and the tests that pin each area, with the behavior no test pins marked. docs/api.md is corrected where it disagreed with the server (the largest relayed datagram is 65490 bytes; a pass can open the relay for about 62 minutes; the kicker also gets MEMBER_LEFT; HEARTBEAT before HELLO gets ERROR 7; capability bit 7 also needs -relay; ROUTE bit 0 follows the local_ip a client sends and is sent once, at join; an unknown room is ERROR 5 for every room request but JOIN_ROOM) and gains a link to the specification.
  • Server: a relay stream that is already open now ends when a pass stops covering it. It is closed at SIGHUP when either player's account is revoked or, where -require-pass is set, when the key that signed either pass is removed, and 60 s after either pass expires unless that player's own connection sends a refresh AUTH. A stream is tracked from its offer, so a reload during setup cannot miss it, and it leaves nothing behind when it ends normally.
  • Docs: the comments in client/psnr.h and client/psnr_app.h are now Doxygen blocks (@file, @defgroup groups, @brief, @param, @return, @note), and every public declaration has text. The existing behaviour text is moved, not rewritten. Comments only: the preprocessed headers have the same tokens as before. No Doxygen configuration or CI job is added yet.
  • Docs and tooling: the README banner (docs/img/banner.png) has a status strip along the bottom: one cell for each component of the README badges (Server, Relay, Sign-in passes, C client, Desktop app, LAN discovery, Admin API) with its status word in the badge colours. tools/art/make_art.py reads the words from docs/features.tsv through tools/badges.py (the weakest row decides), so the image cannot say more than the list. tools/art/art.json pins both files, so --check also fails when the strip's source changes without a new render. The name is a little smaller to make room, and the repository address moved to the bottom row. social.png and the terminal images are unchanged.
  • Docs: docs/README.md, an index of every page in docs/ and the app, deploy, docker and lab READMEs, grouped by what you want to do (play and connect, host, develop, operate, maintain, reference). The README's "More" section links to it, and tools/repo_check.py now fails when a docs/*.md page is not linked from the index.
  • Docs: the README no longer points to the GitHub wiki.
  • Docs: the README's first screen now follows the website's look: a centred title and one-line description that says it is unofficial fan work, two badge rows in the site's colours (with the Discord invite badge), and a divider image between sections.
  • Docs: the README settings table (now 43 flags) and the website's settings list include the two sign-in limit flags for connect mode.
  • Docs: the README settings table and the website's settings list now include the six sign-in pass flags (-pass-key-file, -pass-issuer, -pass-audience, -require-pass, -pass-revoked-file, -pass-max-conns-per-sub), and the README says 41 flags, not 35. The sign-in pass change had left both stale.
  • Docs: the "Project Facts" label on the README is wider and larger (shown at 624 pixels, not 420), with sharper edges and more text on each line, and the Purpose column no longer crowds the right edge.
  • Docs and tooling: the README and docker/README.md name v0.8.0 and its container image as the newest (its manifest lists amd64 and arm64 and is readable without a login), and the notes about re-psn-window say it is in the app archives from v0.8.0 on. No row of the features list changes its since value: the website row stays at main, as the site is deployed from main, not released.

Files

Each archive holds one self-contained server binary (no installer, no runtime needed), LICENSE, NOTICE.md and an examples folder (settings file, systemd unit, proxy configs).
The re-psn-app archives hold the desktop app (one static binary), the matching re-psn-host server binary the app starts for local hosting, re-psn-window (the same app in a window of its own: on Linux it needs WebKitGTK 4.1 installed, on Windows the WebView2 runtime that ships with Windows 10 and 11, and without it the app still opens in your browser), LICENSE, NOTICE.md and its README, for the same three platforms. install.sh --app and install.ps1 -App install the app and its host from a release instead of the server; or unpack one by hand.
The x86_64 AppImage holds the same Linux binary and examples as one runnable file; it needs FUSE to mount, or run it with --appimage-extract-and-run. It is not signed.
install.sh (Linux) and install.ps1 (Windows) are the install scripts from this tag, listed in SHA256SUMS too: download one with SHA256SUMS, check it, read it, then run it (see docs/installing.md).
Check a download with sha256sum -c SHA256SUMS --ignore-missing.

6849472d54a7c5489625c0bfcf0a3bef63a47b702209dacae52588325aeb50c8  re-psn-app-v0.9.0-windows-amd64.zip
8c3283ab08c199a30233eb74840c6ec0aba7282db3ba3cdd261b71b4c68022d4  re-psn-v0.9.0-windows-amd64.zip
97ada53e365d29d5f5531c359c14ddf6d3cc9db0132701dedfac052f1a50300b  re-psn-app-v0.9.0-linux-amd64.tar.gz
664717a309f2bf9f4c038b2d04a012fcdb3cebc75830cb840b919ba83a6c72bb  re-psn-app-v0.9.0-linux-arm64.tar.gz
6bd41a44788b0df1b2f6d46f4b19623b8ea22c81c8df1f30f57c44ce1ec4304e  re-psn-v0.9.0-linux-amd64.tar.gz
1ff6d0b3149abd050e9d0c18ed5d8d3030e8b4c936c56bdae2962b9c2d09d84e  re-psn-v0.9.0-linux-arm64.tar.gz
ffbecf9507af9e4371b3cfcb8c171f6f35a6f4a5f7cfcee2cb5f1cb58518e995  install.sh
ac7bfc9a717d5a59175a92939d79c1ac564139266b881ae87b5cf3968b709155  install.ps1
1b7aeef69318db1ebeaeea152e58560c7ffa0f36bfa474641b1385d0853a5ab4  re-psn-v0.9.0-x86_64.AppImage

Developed with AI agent assistance.

Next release: when ready