feat(nests): advertise both moq-lite-03 and moq-lite-04 ALPNs

Production moq-relay (moq.nostrnests.com) and the kixelated browser
client both ship Lite-04 now. We previously only advertised
moq-lite-03 in the wt-available-protocols header, so a Lite-04-only
relay deployment would refuse the WebTransport CONNECT (no mutual
sub-protocol).

Add moq-lite-04 to the advertised list. The on-the-wire framing for
Subscribe / Group / Announce did NOT change between Lite-03 and
Lite-04, so the existing codec handles either selection unchanged —
this is purely a handshake-layer addition. moq-lite-03 stays listed
first so a relay that supports both still picks the previously-tested
path.

Constants now live on MoqLiteAlpn alongside LITE_03 and LEGACY rather
than being a string literal in QuicWebTransportFactory.

https://claude.ai/code/session_014JfZJHSTvyYYWJbC9VbB47
This commit is contained in:
Claude
2026-05-06 15:27:21 +00:00
parent 361dbbe201
commit 4b736263e0
2 changed files with 24 additions and 3 deletions
@@ -21,14 +21,23 @@
package com.vitorpamplona.nestsclient.moq.lite
/**
* moq-lite ALPN strings. Lite-03 is preferred; `"moql"` is the legacy
* combined ALPN that requires an in-band SETUP exchange.
* moq-lite ALPN strings. The on-the-wire framing for Subscribe / Group
* / Announce did NOT change between Lite-03 and Lite-04, so advertising
* both via `wt-available-protocols` is safe — the relay picks whichever
* it prefers and our existing codec paths handle either. We keep 03 in
* the list as the previously-tested target until the production relay's
* Lite-04 path has interop coverage.
*
* `"moql"` is the legacy combined ALPN that requires an in-band SETUP
* exchange — kept here for completeness; not advertised by the
* factory.
*
* Source: `kixelated/moq-rs/rs/moq-lite/src/version.rs:21-26`,
* `@moq/lite/connection/connect.js:277`.
*/
object MoqLiteAlpn {
const val LITE_03: String = "moq-lite-03"
const val LITE_04: String = "moq-lite-04"
const val LEGACY: String = "moql"
}