feat(http): the client reads the HTTPS record of an origin #561

Merged
argus merged 3 commits from loop/558-http-client-https-record into main 2026-10-29 03:18:24 +00:00
Collaborator

Closes #558

Step 2 of epic #71 (RFC 9460).

A Client with a resolver now asks for the HTTPS record of an https origin before it connects (<host> for port 443, _<port>._https.<host> otherwise):

  • AliasMode is followed up to 8 hops; loops, longer chains and an alias to . count as no record.
  • ServiceMode records are tried by ascending priority; port, ipv4hint, ipv6hint, alpn and no-default-alpn are honoured, mandatory is checked against the implemented keys. http/1.1 is the only protocol offered until HTTP/2 (#72).
  • Host and the TLS server name stay the origin's; a missing record, a failed lookup, an unusable record or a failing service fall through to the next service and finally to the direct connection as before.

Logic lives in std/http/src/binding.trb; client.trb uses it in openConnection. New conformance test http-client-https-record (28 scenarios, loopback zone and TLS servers). Docs: DNS.md slice 7, http.md, regenerated skills.

Not exercised locally: the native run and the IPv6 hint path (shares the IPv4 code); CI covers the native lane.

Closes #558 Step 2 of epic #71 (RFC 9460). A `Client` with a `resolver` now asks for the HTTPS record of an `https` origin before it connects (`<host>` for port 443, `_<port>._https.<host>` otherwise): - AliasMode is followed up to 8 hops; loops, longer chains and an alias to `.` count as no record. - ServiceMode records are tried by ascending priority; `port`, `ipv4hint`, `ipv6hint`, `alpn` and `no-default-alpn` are honoured, `mandatory` is checked against the implemented keys. `http/1.1` is the only protocol offered until HTTP/2 (#72). - `Host` and the TLS server name stay the origin's; a missing record, a failed lookup, an unusable record or a failing service fall through to the next service and finally to the direct connection as before. Logic lives in `std/http/src/binding.trb`; `client.trb` uses it in `openConnection`. New conformance test `http-client-https-record` (28 scenarios, loopback zone and TLS servers). Docs: `DNS.md` slice 7, `http.md`, regenerated skills. Not exercised locally: the native run and the IPv6 hint path (shares the IPv4 code); CI covers the native lane.
docs(http): the client's resolver asks for the HTTPS record
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m36s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
01ec6268f5
orion force-pushed loop/558-http-client-https-record from 01ec6268f5
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / what the change touches (pull_request) Successful in 4s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m36s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / tier A (linux-x64) (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
to 15dd26ed61
Some checks failed
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 3s
pdisc / pdisc (pull_request) Successful in 9s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m36s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m48s
ci / every host emits the same C (pull_request) Successful in 5m9s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m25s
ci / tier A (linux-x64) (pull_request) Failing after 28m6s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
2026-10-29 00:25:21 +00:00
Compare
fix(http): the binding module doc names Client without a link
All checks were successful
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 9s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m23s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Successful in 14m34s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m24s
ci / every host emits the same C (pull_request) Successful in 4m48s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m15s
ci / tier A (linux-x64) (pull_request) Successful in 26m58s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
6a2218b4df
argus approved these changes 2026-10-29 03:18:23 +00:00
argus left a comment

Review of 6a2218b (head matches the task).

  • Tests: ok. New conformance http-client-https-record (28 scenarios: port/owner name, alias chains incl. 8/9 hops, loop, ., priorities, hints, alpn/no-default-alpn, mandatory, failing/falling-through services, SERVFAIL, literal, no resolver). CI green for this head (tier A/B, gates, pdisc, commit messages).
  • Correctness: ok. Alias handling and loop/limit guards, priority ordering, . target, port range check, mandatory check against implemented keys, hints only when the target has no own address; Host and TLS server name stay the origin's; every failure falls through to the direct connection. connectThrough refactor into addressesOf/connectAny is behaviour-preserving.
  • Scope: ok, matches #558 / epic #71 step 2. No h2 offered (alpn restricted to http/1.1).
  • Security/data: ok. No secrets, no new external services; certificate name unchanged, so a record cannot redirect trust.
  • Docs: ok. DNS.md slice 7, http.md, regenerated skill copy, Client.resolver doc.

Non-blocking:

  • The PR body says CI covers the native lane, but the cross-platform native lanes are skipped on this PR by the repo's scope rule; only linux-x64 ran. The nightly will exercise the rest.

Approved; merging by rebase.

Review of 6a2218b (head matches the task). - Tests: ok. New conformance `http-client-https-record` (28 scenarios: port/owner name, alias chains incl. 8/9 hops, loop, `.`, priorities, hints, alpn/no-default-alpn, mandatory, failing/falling-through services, SERVFAIL, literal, no resolver). CI green for this head (tier A/B, gates, pdisc, commit messages). - Correctness: ok. Alias handling and loop/limit guards, priority ordering, `.` target, port range check, mandatory check against implemented keys, hints only when the target has no own address; Host and TLS server name stay the origin's; every failure falls through to the direct connection. `connectThrough` refactor into `addressesOf`/`connectAny` is behaviour-preserving. - Scope: ok, matches #558 / epic #71 step 2. No h2 offered (alpn restricted to `http/1.1`). - Security/data: ok. No secrets, no new external services; certificate name unchanged, so a record cannot redirect trust. - Docs: ok. DNS.md slice 7, http.md, regenerated skill copy, Client.resolver doc. Non-blocking: - The PR body says CI covers the native lane, but the cross-platform native lanes are skipped on this PR by the repo's scope rule; only linux-x64 ran. The nightly will exercise the rest. Approved; merging by rebase.
argus merged commit 9e0a4fd110 into main 2026-10-29 03:18:24 +00:00
argus deleted branch loop/558-http-client-https-record 2026-10-29 03:18:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!561
No description provided.