From 058432130628d00764663ecf819a9adc6793768d Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 8 Nov 2026 03:29:35 +0100 Subject: v5.0.0: protocol v5 and the browser frontend Protocol v5 replaces newline lines with bounded [u32 len][text] frames and REQ/RES/EVT envelopes. Requests carry correlation ids and the server replays the last 256 replies per connection, so a gateway retry cannot double-debit and a late reply cannot clobber a newer request. HELLO/PONG carry server time; crash rounds announce started_at and push coalesced 10 Hz ticks. Crash now commits sha256(seed) before a round and reveals the seed when it ends, so clients recompute the crash point. Adds the webd/ gateway: one blocking thread, one ClientCore and one pinned upstream TLS connection per session, an HttpOnly session cookie, takeover, and a 60-second grace window. The browser sends Command JSON and renders View JSON; it never speaks the game protocol or stores credentials. Adds the vanilla TypeScript browser app at /play/ (login, lobby, all four games, history, notices, crash verification), the nginx /play and /ws routes, and the headless DOM smoke test. webd and the app stay out of the TUI/GUI/server build graph. The client/server version moves to 5.0.0 in lockstep; v4 peers are refused at HELLO. --- web/README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'web/README.md') diff --git a/web/README.md b/web/README.md index 81346fd..3e81468 100644 --- a/web/README.md +++ b/web/README.md @@ -13,6 +13,7 @@ web/ releases.php shared scanner and hash cache install.sh stable Linux installer install.ps1 stable Windows installer + play/ browser app, served at /play/ bin/gui/ apps, served at /bin/gui/... bin/client/ terminal clients bin/server/ servers @@ -20,6 +21,26 @@ web/ Serve `web/` as the document root. Binaries in `bin/` are gitignored. +## Browser app + +`play/` is a static vanilla TypeScript app. It talks to the WebSocket gateway +in `webd/`, not to the game server: the browser sends `Command` JSON and renders +`View` JSON, and the gateway owns the upstream TLS connection and the pinned +server key. nginx serves `/play/` and proxies `/ws` to `127.0.0.1:8890`. + +Build it before publishing: + +```sh +cd web/play +npm ci +npm run build # writes app.js +cd ../.. +``` + +Commit the generated `app.js`; the site then needs no Node at deploy time. +`npm run typecheck` checks the sources. The gateway has its own deployment +notes in `webd/README.md`; it is not part of the player download. + ## Naming The page only lists files that match the release pattern; anything else in @@ -132,9 +153,9 @@ Then open . `deploy.sh` rsyncs `web/` with `--delay-updates`, so a visitor never sees a half-written binary, then fetches the live page and every artifact it lists — GUI apps, installers, terminal clients and servers — and compares the -downloaded bytes with the local SHA-256. `--verify-only` skips the -upload and only checks the live site. Old versions are left on the server; -prune them by hand. +downloaded bytes with the local SHA-256. It also fetches `/play/`, `app.js` and +`style.css`. `--verify-only` skips the upload and only checks the live site. +Old versions are left on the server; prune them by hand. A local directory works as a target, which is how the verification itself is tested: -- cgit v1.2.3