AtlatestRepositorysigil-http3
1# sigil-http3
2
3Experimental server HTTP/3 and WebTransport for
4[Sigil](https://codeberg.org/sigil/sigil). The library provides bounded HTTP/3
5framing, static QPACK, stream transport, request validation, and WebTransport
6session routing over sigil-quic.
7
8## Status
9
10Early development. Frame and SETTINGS codecs, bounded Huffman decoding,
11request HEADERS/DATA/trailers, control streams, concurrent server streams,
12CONNECT/session routing, capsules, and stream/DATAGRAM echo are implemented.
13The browser driver targets the legacy draft02 WebTransport profile. This is
14not a general HTTP/3 client/server or an implementation of the latest
15WebTransport draft. Dynamic QPACK is unsupported. Phone reachability and
16migration across real networks remain experimental; loopback checks do not
17establish either. Independent security review is needed before production use.
19## Dependency
21Add this entry to your `package.sgl` dependencies, then run `sigil deps install`:
23```scheme
24(from-git url: "codeberg:sigil/sigil-http3" branch: "master")
25```
27The manifest pins the accompanying sigil-quic and sigil-nat revisions.
28The endpoint adapter needs IPv4/IPv6-aware UDP support: `udp-socket` families
29and `socket-normalize-address`. This support is not in a released Sigil yet
30and is planned for an upcoming release.
31Codec use does not establish endpoint availability.
33## Usage
35Encode and decode a DATA frame without opening a connection:
37```scheme
38(import (sigil http3 frame))
40(let* ((wire (encode-h3-frame 0 #u8(104 105)))
41 (frame (decode-h3-frame wire)))
42 (display (vector-ref frame 0)) ; => 0 (DATA)
43 (vector-ref frame 1)) ; => #u8(104 105)
44```
46`(sigil http3 connection)` attaches server stream handling to a QUIC engine.
47`(sigil http3 webtransport router)` emits application commands for CONNECT
48sessions and associated streams. See the [router contract](docs/webtransport-router.md),
49[browser profile](docs/chrome-interop.md), and [bounded echo lifecycle](docs/echo-lifecycle.md).
51## Tests
53From a checkout, prepare the exact companion sources, then run the Sigil suite:
55```sh
56bash scripts/prepare-quic.sh
57bash scripts/prepare-nat-dependency.sh
58sigil deps install
59sigil test --report
60cd tools/interop
61sigil deps install
62sigil test --report
63```
65The preparation scripts accept a local repository or Git URL as their first
66argument. `HTTP3_QUIC_SOURCE` and `HTTP3_NAT_SOURCE` override the defaults.
67The codec and interop suites have 123 cases combined; endpoint integration
68checks need the socket-capable runtime described above.
70With Node.js 20 or later, OpenSSL and loopback UDP/HTTPS available:
72```sh
73bash scripts/phantom-lifecycle-check.sh
74node --test test/test-punch-prime.mjs test/test-continuous-punch-window.mjs
75node --test tools/port-mapping/test-codecs.mjs
76```
78The retained `phantom-` script names are compatibility names. A Linux host
79with a C toolchain runs builds; browser probes additionally need Chrome.
80Live helpers use explicit host, interface, origin and input-directory settings;
81see [tool configuration](docs/tool-configuration.md). Browser, phone and
82public-network checks are separate from the offline suite.
84## License
86BSD-3-Clause. See [LICENSE](LICENSE). Generated QPACK/Huffman tables retain
87their RFC source attribution in the source files.