Repository navigation
WebTransport Swift 1.3.0
Published from commit 3060a6e. The code audit for this release was performed by Claude Opus 5.
Corrected after publication. The failure-rate figures originally quoted in these notes were measured on a development machine under heavy load and do not reproduce on controlled hardware. The defects described below are real and were confirmed mechanically, but the rates attached to them have been withdrawn. See Audit Phase 05.
Added
- Server TLS identity —
WebTransportServerIdentitysupplies a listener's certificate as a PKCS#12 bundle or an explicit DER chain with a matching private key, and reports expiry so rotation can be scheduled. Rotation replaces a listener without restarting the process. - Admission control —
WebTransportAdmissionPolicyandWebTransportTransportLimitscap concurrent connections, optionally rate-limit newly accepted ones before the handshake is driven, and bound what an unauthenticated peer can make the server commit. - Graceful shutdown — live sessions are signalled and in-flight work drains within a bounded grace period.
- Browser support —
settingsValidation: .interoperableaccepts browsers, which send:protocol = webtransportrather than the draft-16webtransport-h3token and omitSETTINGS_WT_ENABLE_WEBTRANSPORT. The draft-16 token remains what this implementation sends; nothing was relaxed on the sending side. - Verification — a seeded fuzz corpus for every parser that reads peer bytes, a containerized third-party interop matrix, a connection-churn soak, and CI jobs for manifest agreement, AddressSanitizer fuzzing and ThreadSanitizer.
Fixed
- Browsers could not connect. Two HTTP/3 critical streams were released after being read. The transport then finishes the stream, which a peer cannot distinguish from closing it deliberately, and answers with
H3_CLOSED_CRITICAL_STREAM. Found against Chrome; no self-test could have caught it, because both ends shared the assumption. - Inbound streams were discarded when they arrived before a handler existed. Most often the peer's HTTP/3 control stream, which leaves both ends waiting on each other until they time out. The loss was confirmed directly by logging every delivery: the peer's later streams arrived while the first one never did.
- A timed-out wait for a stream left its claim behind, so the next stream to arrive was handed to a caller that had already given up.
acceptBidirectionalStreampolls with a timeout and could therefore lose a stream the peer genuinely opened. - Terminated session and stream state was retained without bound, letting a peer grow server memory by opening and closing sessions on a single connection.
- Advertised and enforced datagram ceilings disagreed, rejecting a peer sending exactly what it had been told it could send.
- Malformed
wt-protocolandwt-available-protocolsheaders were downgraded to absent rather than rejected, leaving the ends disagreeing about the subprotocol in force. - Certificate generation now fails instead of degrading when the CSPRNG fails, and three busy-wait loops became event-driven waits.
Not backwards compatible
The built-in development certificate is refused on any non-loopback bind address. A server that previously bound 0.0.0.0 with default settings started and was silently unreachable by every real client. It now fails at startup with an error naming the fix. Supply a real identity through WebTransportServerIdentity for any routable bind.
Known limitation
Session establishment is load-sensitive. On an unsaturated machine no failures were observed in 4000 loopback sessions; with every core saturated, roughly 1% fail to establish and end in a timeout rather than an error. Treat a connect timeout as retryable whenever the host may be under load. See Known Limitations.
Verification
- 256 package tests, plus 40 client and 40 server conformance scenarios, under
-warnings-as-errorswith complete concurrency checking. - CI green on the release commit across all three jobs.
- Docker interop 5/5 across pywebtransport/aioquic, web-transport-quinn and web-transport-quiche.
- Chrome 148 verified end to end over both a stream and a datagram.
Binaries
Thin arm64 Mach-O, running natively on every Apple Silicon Mac (M1 and later). Ad-hoc signed rather than Developer ID signed, and not notarized, so Gatekeeper quarantines them on first run.
shasum -a 256 -c SHA256SUMS
xattr -d com.apple.quarantine WebTransportClient WebTransportServer
./WebTransportServer --scenario all| Artifact | SHA-256 |
|---|---|
WebTransportClient |
f975de2cb9bb8b090f2b2ff8fa3cb1434401f515a2dd4b533cdaf21c6887b94a |
WebTransportServer |
3dc8d2ca254715f726664c370f24d5ca976b565976110131a3277663c2418e92 |
Both are reproducible: ./Swift/build-release-apple-silicon.sh performs two clean builds and compares normalized Mach-O hashes.