Repository navigation
12.6.36: Play Together guests from Firefox, VPN or IPv6 no longer refused by the hub - #959
Merged
Merged
Conversation
The 404s in Fly's status chart are scanners and crawlers that found the hub's name
(certificate logs list it): Fly's proxy log shows `/` and `/phpinfo`, and none of
the apps or pages asks for anything but /ws. The hub now counts every request that
is not a WebSocket to /ws or a health check in hub_http_strays_total by a fixed
class of its path (root, favicon, robots, well_known, ws_not_websocket, other),
never the path, query or address, and answers /robots.txt with Disallow: / so
well-behaved crawlers stop. 404s and the /ws refusals keep their old answers.
/ws/ (a hub address typed with a slash) is /ws.
hub_limited_total{limit} says which limit refused something (join rate, a guest's
or a client's signals, room clients, connections, rooms), next to the
rate_limited error the client gets, and hub_rooms_closed_total counts rooms their
host closed, so opened = closed + expired + open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
Each guest sends its offer and then every ICE candidate its browser finds, one signal each, and the hub closed a guest past 20 signals a minute. The Play Together page offers a data channel, a video and an audio track, and browsers gather a set of candidates for each: Firefox found 20 on one plain network, so with the offer it was closed (rate_limited) before it could connect, and the page showed "can't reach the hub". Homes with IPv6 or a VPN find twice as many, and a family behind one address shared 60 a minute for all their tries. Per guest is now 60 a minute and per client in a room 300. A test plays a home of three devices, each trying twice with 40 candidates, and checks that no limit fires (and that the old limits did). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
The guest and phone pages sent every ICE candidate the browser found through the hub, one signal each, and the browser finds a set for each of the page's sections (data channel, video, audio): Firefox 20 on one plain network, which with the offer went past the hub's per-guest limit and closed the join before it could connect. Half of them were never used: the engine drops .local (mDNS) candidates and has no TCP sockets. The page now leaves those out. Measured in Playwright on this Mac for the Play Together page: Firefox 20 candidates found, 10 sent; Chromium 6 found, 3 sent. What the engine receives is unchanged, so it works with every app version. Rebuilt the embedded pages and the website's copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hub's per-guest signal limit (20/min) was below what a Firefox guest sends (offer + ~20 ICE candidates), so joins were closed as rate_limited and the page said the hub couldn't be reached (130 such refusals in 6 h on the live hub). Limits raised (60 per guest/min, 300 per client per room), the join page stops sending .local and TCP candidates the engine drops, and the hub counts which limit fired and stray HTTP requests (404s were scanners). /robots.txt and /ws/ served. Compatible both ways. Hub tests 38, Play Together engine tests 277, page tests 157 pass; embedded pages rebuilt.
After merge: redeploy the hub (fly deploy) and let Pages publish site/join and site/pad.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT