Releases: quic-go/quic-go
v0.57.1
v0.57.0
This release reworks the HTTP/3 header processing logic:
- Both client and server now send their respective header size constraints using the SETTINGS_MAX_FIELD_SECTION_SIZE setting: #5431
- For any QPACK-related errors, the correct error code (QPACK_DECOMPRESSION_FAILED) is now used: #5439
- QPACK header parsing is now incremental (instead of parsing all headers at once), which is ~5-10% faster and reduces allocations: #5435 (and quic-go/qpack#67)
- The server now sends a 431 status code (Request Header Fields Too Large) when encountering HTTP header fields exceeding the size constraint: #5452
Breaking Changes
- http3:
Transport.MaxResponseBytesis now anint(before:int64): #5433
Notable Fixes
- qlogwriter: fix storing of event schemas (this prevented qlog event logging from working for HTTP/3): #5430
- http3: errors sending the request are now ignored, instead, the response from the server is read (thereby allowing the client to read the status code, for example): #5432
What's Changed
- build(deps): bump golangci/golangci-lint-action from 8 to 9 by @dependabot[bot] in #5426
- qlogwriter: fix storing of event schemas by @marten-seemann in #5430
- http3: send SETTINGS_MAX_FIELD_SECTION_SIZE in the SETTINGS frame by @marten-seemann in #5431
- http3: read response after encountering error sending the request by @marten-seemann in #5432
- http3: make Transport.MaxResponseBytes an int by @marten-seemann in #5433
- http3: add a benchmark for header parsing by @marten-seemann in #5435
- update qpack to v0.6.0 by @marten-seemann in #5434
- http3: use QPACK_DECOMPRESSION_FAILED for QPACK errors by @marten-seemann in #5439
- add documentation for Conn.NextConnection by @marten-seemann in #5442
- ackhandler: don’t generate an immediate ACK for the first packet by @marten-seemann in #5447
- don’t arm connection timer for connection ID retirement by @marten-seemann in #5449
- README: add nodepass to list of projects by @yosebyte in #5448
- qlogwriter: use synctest to make tests deterministic by @marten-seemann in #5454
- http3: limit size of decompressed headers by @marten-seemann in #5452
New Contributors
Full Changelog: v0.56.0...v0.57.0
v0.56.0
This release introduces qlog support for HTTP/3 (#5367, #5372, #5374, #5375, #5376, #5381, #5383).
For this, we completely changed how connection tracing works. Instead of a general-purpose logging.ConnectionTracer (which we removed entirely), we now have a qlog-specific tracer (#5356, #5417). quic-go users can now implement their own qlog events.
It also removes the Prometheus-based metrics collection. Please comment on the tracking issue (#5294) if you rely on metrics and are interested in seeing metrics brought back in a future release.
Notable Changes
- replaced the unmaintained gojay with a custom, performance-optimized JSON encoder (#5353, #5371)
- quicvarint: improved panic message for numbers larger than 2^62 (#5410)
Behind the Scenes
Go 1.25 introduced support for testing concurrent code using testing/synctest. We've been working on transitioning tests to use synctest (#5357, #5391, #5393, #5397, #5398, #5403, #5414, #5415), using @MarcoPolo's simnet package to simulate a network in memory.
Using synctest makes test execution more reliable (reducing flakiness). The use of a synthetic clock leads to a massive speedup; the execution time of some integration tests was reduced from 20s to less than 1ms. The work will continue for the next release (see tracking issue: #5386).
Changelog
- qlog: implement a minimal jsontext-like JSON encoder by @marten-seemann in #5353
- ci: remove 386 (32 bit x86) by @MarcoPolo in #5352
- use synctest in more connection tests by @marten-seemann in #5357
- qlog: split serializiation and event definitions, remove logging abstraction by @marten-seemann in #5356
- qlogwriter: implement the draft-12 trace header by @marten-seemann in #5360
- qlogwriter: add support for event_schemas in the trace header by @marten-seemann in #5361
- qlogwriter: pass the event time to Event.Encode by @marten-seemann in #5362
- ackhandler: fix qlogging of alarm timer expiration time by @marten-seemann in #5363
- qlog: privatize Encode functions of non-Event structs by @marten-seemann in #5364
- fix qlogging of the short header payload length by @marten-seemann in #5365
- ci: include OS and Go version in Codecov test report upload by @marten-seemann in #5370
- http3: add basic server-side qlog support by @marten-seemann in #5367
- jsontext: add support for encoding null by @marten-seemann in #5371
- qlog: use PathEndpointInfo in connection_started by @marten-seemann in #5368
- http3: fix qlog encoding of frame_parsed and frame_created events by @marten-seemann in #5372
- http3: add basic client-side qlog support by @marten-seemann in #5374
- readme: update oss-fuzz link by @kriztalz in #5377
- http3: qlog sent and received GOAWAY frames by @marten-seemann in #5376
- http3: qlog sent and received DATAGRAMs by @marten-seemann in #5375
- http3: move qlogging of frames into the frame parser by @marten-seemann in #5378
- http3: qlog sent and received SETTINGS frames by @marten-seemann in #5379
- http3: qlog the frame length and payload length of parsed frames by @marten-seemann in #5380
- http3: qlog reserved, unsupported and unknown frames by @marten-seemann in #5381
- http3: add the qlog event schema to trace header by @marten-seemann in #5383
- use default RTT (100ms) for 0-RTT if no prior estimate by @marten-seemann in #5388
- congestion: avoid overflows when calculating pacer budget by @marten-seemann in #5390
- add simnet package to simulate a net.PacketConn in memory by @marten-seemann in #5385
- use synctest for transport tests by @marten-seemann in #5391
- use simnet in CONNECTION_CLOSE retransmission test by @marten-seemann in #5395
- use synctest for the packet drop test by @marten-seemann in #5393
- use synctest for the handshake drop test by @marten-seemann in #5397
- use synctest for the datagram test by @marten-seemann in #5398
- use synctest for the timeout tests by @marten-seemann in #5403
- fix flaky TestConnectionUnpackFailureDropped by @Copilot in #5382
- fix flaky TestServerTransportClose by @Copilot in #5407
- ci: use gcassert to check that quicvarint.Len is inlined by @marten-seemann in #5409
- quicvarint: improve panic message for numbers larger 2^62 by @marten-seemann in #5410
- ci: bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #5411
- ci: update golangci-lint to v2.6.0 by @marten-seemann in #5412
- qlog: rename owner to initiator by @marten-seemann in #5416
- use synctest for the stateless reset tests by @marten-seemann in #5415
- ackhandler: fix qlogging of RTT values by @marten-seemann in #5418
- qlog: rework the ConnectionClosed event by @marten-seemann in #5417
- qlog: split the PTO count updates ouf of the MetricsUpdated event by @marten-seemann in #5421
New Contributors
Full Changelog: v0.55.0...v0.56.0
v0.55.0
This release contains a number of improvements and fixes, and it updates the supported Go versions to 1.24 and 1.25.
Optimizations
When sending packets on a QUIC connection, RFC 9002 requires us to save the timestamp for every packet sent. In #5344, we implemented a memory-optimized drop-in replacement for time.Time, which reduces the memory required from 24 to 8 bytes, and vastly speeds up timer calculations (which happen very frequently).
New Features
- Basic connection statistics are now exposed via
Conn.ConnectionStats, thanks to @MarcoPolo - On some links, packet reordering can lead to spurious detections of packet loss when using the loss detection logic specified in RFC 9002. #5355 adds logic detect when packet loss is detected spuriously.
Notable Fixes
- http3: don't allow usage of closed
Transport: #5324, thanks to @Glonee - http3: fix race in concurrent
Transport.Roundtripcalls: #5323, thanks to @Glonee - improve and fix connection timer logic: #5339, thanks to @sukunrt for a very comprehensive code review
Behind the Scenes
We have started transitioning tests to make use of the new synctest package that was added in Go 1.25 (and was available as a GOEXPERIMENT in Go 1.24): #5291, #5296, #5298, #5299, #5302, #5304, #5305, #5306, #5317. This is a lot of work, but it makes the test execution both faster and more reliable.
Changelog
- wire: implement parsing and writing of the ACK_FREQUENCY frame by @marten-seemann in #5264
- wire: implement parsing and writing of the IMMEDIATE_ACK frame by @marten-seemann in #5265
- fuzzing: fix timeout in frame parser by @jannis-seemann in #5268
- wire: add support for the min_ack_delay transport parameter by @marten-seemann in #5266
- fix missing log statement for STREAM, DATAGRAM and ACK by @jannis-seemann in #5273
- qlog: add support for ACK_FREQUENCY and IMMEDIATE_ACK frames by @marten-seemann in #5276
- ackhandler: remove unused time from receivedPacketHandler.ReceivedPacket by @marten-seemann in #5277
- quicvarint: extend benchmark to use quicvarint.Reader by @marten-seemann in #5278
- quicvarint: tolerate empty reads of the underlying io.Reader by @bemasc in #5275
- http3: fix documentation for Server.ServeListener by @WeidiDeng in #5282
- expose connection stats via Conn.ConnectionStats by @marten-seemann in #5281
- ackhandler: generalize check for missing packets below threshold by @marten-seemann in #5260
- update to Go 1.25, drop Go 1.23, use go tool for gomock by @marten-seemann in #5283
- replace
interface{}withanyby @marten-seemann in #5290 - use testing.B.Loop in all benchmark tests by @marten-seemann in #5285
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #5293
- use synctest to make receive stream tests fully deterministc by @marten-seemann in #5291
- use synctest to make streams map tests fully deterministic by @marten-seemann in #5296
- ci: cache the Go build cache for cross-compilation workflow by @marten-seemann in #5297
- ci: fix cache save and restore logic for cross compile workflow by @marten-seemann in #5300
- restore previously deleted TestStreamsMapConcurrent test by @marten-seemann in #5301
- use synctest to make the send queue tests fully deterministic by @marten-seemann in #5302
- use synctest to make the send stream tests fully deterministic by @marten-seemann in #5298
- ci: use
go mod tidy -diffto check for tidiedgo.modby @marten-seemann in #5303 - use synctest to make the datagram queue tests fully deterministic by @marten-seemann in #5305
- utils: use synctest to make the timer tests fully deterministic by @marten-seemann in #5306
- ackhandler: fix resetting of packet.isPathProbePacket by @marten-seemann in #5310
- ackhandler: use an iterator to process received packet ranges by @marten-seemann in #5309
- ackhandler: use a typed mock for the ECNHandler by @marten-seemann in #5311
- ackhandler: immediately clear ackedPacket slice after processing ACK by @marten-seemann in #5313
- ci: improve cache key generation for the cross compilation job by @marten-seemann in #5315
- ci: fix cache paths in cross compile workflow by @marten-seemann in #5318
- ackhandler: avoid storing packet number in packet struct by @marten-seemann in #5312
- ackhandler: store skipped packet numbers separately by @marten-seemann in #5314
- ackhandler: account for skipped packets in packet threshold calculation by @marten-seemann in #5316
- ackhandler: store the last four skipped packets by @marten-seemann in #5322
- http3: fix data race in Transport by @Glonee in #5323
- qlog: add a benchmark for the ConnectionTracer by @marten-seemann in #5328
- qlog: merge event category and name by @marten-seemann in #5329
- http3: don't allow usage of closed Transport by @Glonee in #5324
- build(deps): bump actions/setup-go from 5 to 6 by @dependabot[bot] in #5330
- fix: return stream frames to pool on error paths by @lidel in #5327
- ackhandler: add a benchmark for sending and acknowledging packets by @marten-seemann in #5333
- implement a memory-optimized time.Time replacement by @marten-seemann in #5334
- add a benchmark test for data transfers by @marten-seemann in #5335
- improve connection timer logic by @marten-seemann in #5339
- use synctest to make the connection tests fully deterministic by @marten-seemann in #5317
- drop initial packets when the handshake is confirmed by @marten-seemann in #5354
- protocol: optimize ConnectionID.String by @marten-seemann in #5351
- fix missing tracing of restored transport parameters by @marten-seemann in #5349
- ackhandler: track lost packets and detect spurious losses by @marten-seemann in #5355
New Contributors
Full Changelog: v0.54.0...v0.55.0
v0.54.0
This release adds support for QUIC Stream Resets with Partial Delivery, a QUIC extension that allows resetting a stream, while guaranteeing delivery of stream data up to a certain byte offset (#5155, #5158, #5160, #5235, #5242, #5243). This extension is a requirement of newer versions of WebTransport over HTTP/3.
Other Notable Changes
- http3: the package now doesn't depend on any internal quic-go packages: #5256
- wire: return concrete structs (instead of a
wire.Frame) for common frame types (STREAM, DATAGRAM, ACK), speeding up STREAM frame parsing by ~18%: #5253, #5227, thanks to @jannis-seemann
Fixes
- fix retransmission logic for path probing packets: #5241
- close the
TransportwhenDialAddrfails: #5259, thanks to @rbqvq
Changelog
- fix retransmission logic for path probing packets by @marten-seemann in #5241
- implement receiver side behavior for RESET_STREAM_AT by @marten-seemann in #5235
- implement sender side behavior for RESET_STREAM_AT by @marten-seemann in #5242
- fix flaky TestTransportReplaceWithClosed by @marten-seemann in #5245
- fix flaky TestDrainServerAcceptQueue by @marten-seemann in #5247
- fix flaky TestServerReceiveQueue by @marten-seemann in #5249
- http3: fix flaky TestConnGoAwayFailures by @marten-seemann in #5252
- add a Config and ConnectionState flag for RESET_STREAM_AT by @marten-seemann in #5243
- fix flaky TestPostQuantumClientHello by @marten-seemann in #5253
- http3: Remove dependency on quic internal package by @rthellend in #5256
- close Transport when DialAddr fails by @rbqvq in #5259
- wire: improve frame parsing benchmarks by @jannis-seemann in #5263
- optimize parsing logic for STREAM, DATAGRAM and ACK frames by @jannis-seemann in #5227
New Contributors
Full Changelog: v0.53.0...v0.54.0
v0.53.0
This release introduces a massive overhaul of the quic-go API. See this blog post for more details about the motivation. Most users will need to make some changes when upgrading to this version.
- The
Connectioninterface was removed in favor of aConnstruct (#5195). - The
ReceiveStream,SendStreamandStreaminterfaces were replaced with structs of the same name (#5149, #5172, #5173, #5214).
In most cases, migrating downstream code should be fairly straightforward. For example, a method that used to accept a quic.Connection as a parameter now needs to accept a *quic.Conn, and a function handling a quic.Stream now needs to handle a *quic.Stream. Of course, consumers of quic-go are free to define their own interfaces.
Similarly, on the HTTP/3 layer:
- The
Connectioninterface was replaced with aConnstruct (#5204). - The
RequestStreaminterface was converted to a struct (#5153, #5216). - The
Streaminterface was converted to a struct (#5154).
We expect that most HTTP/3 users won't need to adjust their code, if they use the package to run an HTTP/3 server and dial HTTP/3 connection. More advanced use cases, such as WebTransport and the various MASQUE protocols, will require updates. We have already released new versions of webtransport-go and masque-go to support these changes.
Other Breaking Changes
- http3: the deprecated
SingleDestinationRoundTripperwas removed (#5217)
Notable Fixes and Improvements
- fix Goroutine leak when receiving a Version Negotiation packets race with dial context cancellation (#5203)
- drain the server accept queue when closing the transport (#5237), thanks to @sukunrt
- fix a race condition when closing transport (#5220), thanks to @sukunrt
- quicvarint: speed up parsing of 1, 2 and 4-byte varints (~12.5% for 1 and 2 bytes, ~1% for 4 bytes) (#5229), thanks to @jannis-seemann
- http3: expose
ClientConn.Context,CloseWithErrorandConn: #5219 - http3:
RequestStreamcould be misused in many different ways, that's why we tightened the error checks (#5231)
Behind The Scenes
We've completed the migration of the entire test suite away from Ginkgo (#3652) and towards standard Go tests (#5084, #5150, #5151, #5193, #5194, #5196, #5198). This was a major undertaking, spanning roughly 9 months and resulting in a complete rewrite of quic-go's test suite (> 40,000 lines of code!). Users will now benefit from a significantly slimmed-down dependency tree when upgrading.
Changelog
- http3: migrate the stream tests away from Ginkgo by @marten-seemann in #5150
- http3: migrate the state tracking stream tests away from Ginkgo by @marten-seemann in #5151
- implement parsing and writing of RESET_STREAM_AT frames by @marten-seemann in #5155
- wire: add support for the reset_stream_at transport parameter by @marten-seemann in #5158
- qlog: add support for reset_stream_at frame and transport parameter by @marten-seemann in #5160
- http3: convert RequestStream from an interface to a struct by @marten-seemann in #5153
- http3: convert Stream from an interface to a struct by @marten-seemann in #5154
- http3: simplify HTTP datagram handling by @marten-seemann in #5156
- http3: use actual QUIC connection and stream in server tests by @marten-seemann in #5161
- http3: use actual QUIC connection and stream in client tests by @marten-seemann in #5162
- http3: use actual QUIC connection and stream in conn tests by @marten-seemann in #5163
- http3: use actual QUIC connection in transport tests by @marten-seemann in #5164
- http3: use actual QUIC stream in state tracking stream tests by @marten-seemann in #5166
- http3: use actual QUIC connection in frames tests by @marten-seemann in #5165
- http3: fix flaky TestClientStreamHijacking by @marten-seemann in #5169
- http3: use actual QUIC connection in stream tests by @marten-seemann in #5170
- mockquic: remove package by @marten-seemann in #5171
- fix flaky TestDatagramLoss by @marten-seemann in #5174
- fix flaky TestConnectionPathValidation by @marten-seemann in #5175
- fix flaky TestHTTPRequestAfterGracefulShutdown by @marten-seemann in #5178
- fix flaky TestGracefulShutdownPendingStreams by @marten-seemann in #5179
- fix flaky TestTransportReplaceWithClosed by @marten-seemann in #5181
- http3: fix flaky TestClientResponseValidation by @marten-seemann in #5183
- http3: fix flaky TestServerRequestHeaderTooLarge by @marten-seemann in #5186
- http3: fix flaky TestConnControlStreamFailure by @marten-seemann in #5188
- avoid triggering macOS dual-stack flakiness in HTTP/3 integration tests by @marten-seemann in #5187
- convert Stream interface to a struct by @marten-seemann in #5149
- convert SendStream interface to a struct by @marten-seemann in #5172
- convert ReceiveStream interface to a struct by @marten-seemann in #5173
- ackhandler: migrate the ECN tests away from Ginkgo by @marten-seemann in #5084
- congestion: migrate tests away from Ginkgo by @marten-seemann in #5193
- ci: stop using Ginkgo test command by @marten-seemann in #5194
- mocks: simplify mockgen command to generate MockCryptoSetup by @marten-seemann in #5197
- ci: remove leftover check for Ginkgo imports by @marten-seemann in #5198
- http3: simplify connection closing in the frame parser by @marten-seemann in #5196
- fix Goroutine leak on version negotiation race with context cancel by @marten-seemann in #5203
- simplify stream ID handling in the incoming streams map by @marten-seemann in #5207
- simplify stream ID handling in the outgoing streams map by @marten-seemann in #5209
- ci: enable Codecov test analysis by @marten-seemann in #5210
- remove connection flow controller mock by @marten-seemann in #5213
- handle stream-related frame in the streams map by @marten-seemann in #5212
- explictly expose all method on the Stream by @marten-seemann in #5214
- convert Connection interface to Conn struct by @marten-seemann in #5195
- http3: convert Connection interface to Conn struct by @marten-seemann in #5204
- http3: remove deprecated SingleDestinationRoundTripper type by @marten-seemann in #5217
- rename Conn receiver variable by @marten-seemann in #5215
- ci: enable the nolintlint linter in golangci-lint by @marten-seemann in #5221
- ci: enable the usetesting linter in golangci-lint by @marten-seemann in #5222
- ci: add Go 1.25rc1 to tested Go versions by @marten-seemann in #5224
- http3: add ClientConn.Context, CloseWithError and Conn by @marten-seemann in #5219
- http3: explicitly expose all method on the RequestStream by @marten-seemann in #5216
- http3: remove deprecated RoundTripper by @marten-seemann in #5230
- http3: avoid reinitilising the frame parser on the stream by @marten-seemann in #5232
- http3: tighten checks for incorrect use of RequestStream by @marten-seemann in #5231
- improve documentation for the various error types by @marten-seemann in #5233
- handshake: store key update interval in an atomic by @marten-seemann in #5234
- fix deadlock when closing the Transport by @sukunrt in #5220
- drain server accept queue when the transport is closed by @marten-seemann in #5237
- quicvarint: speed up parsing of 1, 2 and 4 byte varints by @jannis-seemann in #5229
New Contributors
- @jannis-seemann made their first contribution in #5229
Full Changelog: v0.52.0...v0.53.0
v0.52.0
This release focus on HTTP/3 graceful shutdown using the GOAWAY mechnism.
On the server side graceful shutdown is initiated by calling the http3.Server.Shutdown method:
- A single GOAWAY frame is sent, instructing the client to not issue any new requests (#5114).
- New requests are rejected by resetting the streams using the H3_REQUEST_REJECTED reset error code: #5116.
- QUIC listeners created by the HTTP/3 server (i.e. when using
http3.Server.ListenAndServeandListenAndServeTLS) are immediately closed (#5101). QUIC listeners created by the application (i.e. when usinghttp3.Server.ServeListener) are left running, it is the application's responsibility to close them, or use them in a new server instance (#5129). - Note that the during the graceful shutdown period, the server does not close existing connections, as this is racy in the presence of packet reordering.
On the client side, when receiving a GOAWAY frame:
- No new streams will be opened on the new connection. Requests to the same origin will be sent on a freshly established QUIC connection.
- Once all requests have completed / were cancelled, the underlying QUIC connection is closed: #5143 and #5145.
Breaking Changes
Transport.ConnContextnow passes theClientInfoto the callback, and allows rejecting handshakes by introducing anerrorreturn value: #5122. This allows applications to build more sophisticated DoS defenses. Thanks to @sukunrt!- Connections accepted from a
Listenerusing theListenandListenAddrconvenience functions now aren't closed when the listener is closed. This makes the shutdown behavior consistent with listeners created from aTransport, and the standard library'snet.Listener: #5108.
Other Notable Changes
- The TLS ClientHello is now fragmented into multiple pieces, complicating Deep Packet Inspection of the handshake by middlebox: #5107. This behavior can be disabled by setting the
QUIC_GO_DISABLE_CLIENTHELLO_SCRAMBLINGenvironment variable. - Kernel control messages for ECN and for picking the correct network interface now work on big-endian platforms such as s390x: #5094 and #5105. Thanks to @Zxilly!
- The RTT estimate is now stored in the resumption token (and not in the TLS session ticket): #5065. Thanks to @tanghaowillow!
Fixes
- http3: The Alt-Svc entry is now removed when
http3.Server.Servereturns: #5093. - http3:
http3.Server.ServeQUICConnnow returnshttp.ErrServerClosedwhen called on a closed server: #5095. - http3: The datagram receive loop now doesn't prematurely return when receiving a datagram for an unknown stream: #5136.
- http3: Requests are now only retried when it can be guaranteed that the server didn't process the request: #5141.
- http3: Prevent a stream leak when the server sends too many 1xx responses: #5144.
Behind The Scenes
As in the last couple of releases, we continued our ongoing effort to migrate away from the Ginkgo test suite (tracking issue #3652), mostly in the HTTP/3 package: #5068, #5069, #5070, #5073, #5075, #5078, #5067, #5081, #5085, #5096, #5133. There are still ~1400 LOC of Ginkgo tests to clean up, scattered across the code base.
Changelog
- use assert.AnError consistently in tests by @marten-seemann in #5066
- http3: migrate the request writer tests away from Ginkgo by @marten-seemann in #5069
- http3: migrate the headers tests away from Ginkgo by @marten-seemann in #5068
- http3: simplify request writer by writing to an io.Writer by @marten-seemann in #5070
- http3: check response writer for http.ResponseController methods by @marten-seemann in #5071
- http3: migrate the capsule tests away from Ginkgo by @marten-seemann in #5073
- http3: migrate the response writer tests away from Ginkgo by @marten-seemann in #5075
- http3: migrate the datagram tests away from Ginkgo by @marten-seemann in #5076
- http3: migrate the body tests away from Ginkgo by @marten-seemann in #5078
- http3: migrate the frames tests away from Ginkgo by @marten-seemann in #5067
- ackhandler: migrate the packet number generator tests away from Ginkgo by @marten-seemann in #5081
- http3: use httptest.NewRequest by @marten-seemann in #5086
- http3: update
HijackerandHTTPStreamerdocumentation by @TheoTechnicguy in #5089 - http3: use a slice instead of a map to store active listeners by @marten-seemann in #5087
- http3: remove Alt-Svc entry when Server.Serve returns by @marten-seemann in #5093
- http3: return http.ErrServerClosed for ServeQUICConn after Server.Close by @marten-seemann in #5095
- fix: parse ifindex from packet correctly by @Zxilly in #5094
- http3: migrate the server tests away from Ginkgo by @marten-seemann in #5085
- fix dequeuing logic for tiny CRYPTO frames by @marten-seemann in #5104
- remove periodic logging functionality from packet handler map by @marten-seemann in #5110
- delete retired connection IDs after 3 PTOs by @marten-seemann in #5109
- simplify tracking of Transports for connection migration by @marten-seemann in #5111
- ci: set a 30 minute timeout for the interop Docker job by @marten-seemann in #5112
- http3: send GOAWAY frame in a new Goroutine by @marten-seemann in #5114
- ci: also build the interop image on pull requests, but skip pushing by @marten-seemann in #5115
- delete closed connections after 3 PTOs by @marten-seemann in #5117
- http3: reset request streams accepted after graceful shutdown by @marten-seemann in #5116
- ci: bump golangci-lint-action to v8 and golangci-lint to v2.1.6 by @dependabot in #5118
- move connection tracking into the Transport by @marten-seemann in #5113
- ci: remove stray GITREF env from Docker interop workflow by @marten-seemann in #5119
- split SNI and ECH extensions in the ClientHello by @marten-seemann in #5107
- ci: only apply the interop Docker build concurrency group for pushes by @marten-seemann in #5120
- fix ECN control messages on big-endian architectures by @Zxilly in #5105
- remove stray assertion that handshakes are running from tests by @marten-seemann in #5123
- fix race condition in tests when setting the key update interval by @marten-seemann in #5121
- remove the changelog by @marten-seemann in #5074
- never close accepted connections when the listener is closed by @marten-seemann in #5108
- http3: don't close QUIC listeners created by the application by @marten-seemann in #5129
- http3: close QUIC listeners created by Server on graceful shutdown by @marten-seemann in #5101
- use the slices package to simply QUIC version comparisons by @marten-seemann in #5130
- http3: migrate the client tests away from Ginkgo by @marten-seemann in #5096
- http3: keep datagram receive loop running on datagram for unknown stream by @marten-seemann in #5136
- http3: migrate the connection tests away from Ginkgo by @marten-seemann in #5133
- http3: fix flaky TestClientRequestLengthLimit by @marten-seemann in #5137
- fix flaky TestHandshakeCloseListener by @marten-seemann in #5140
- http3: only retry requests for which it is safe to do so by @marten-seemann in #5141
- pass ClientInfo to ConnContext, allow rejecting of handshakes by @sukunrt in #5122
- store the RTT in the token, not in the session ticket by @tanghaowillow in #5065
- http3: reset request stream if the server sends too many 1xx responses by @marten-seemann in #5144
- http3: implement client-side GOAWAY handling by @marten-seemann in #5143
- http3: fix off-by-one error when processing the GOAWAY stream ID by @marten-seemann in #5145
New Contributors
- @TheoTechnicguy made their first contribution in #5089
Full Changelog: v0.51.0...v0.52.0
v0.51.0
This release introduces client-side support for QUIC Connection Migration (server-side support was added in the last release). Clients can now probe multiple paths and switch between them mid-connection. For example, this enables seamless migration from Wi-Fi to a cellular connection when Wi-Fi connectivity deteriorates.
For details on using the new Connection Migration API, please refer to the documentation.
Breaking Changes
- The error returned from
Connection.OpenStream,OpenUniStream,OpenStreamSyncandOpenUniStreamSyncdoesn't implementnet.Erroranymore. Use error assertion onStreamLimitReachedErrorinstead: #5060 ClientHelloInfowas renamed toClientInfo: #5016
Other Notable Changes
- Documentation improvements: #4955 (thanks to @mark-rushakoff!), #5047, #5061
- http3: reject duplicate pseudo headers: #4993 (thanks to @pittgi!)
- Correctly handle undefined IPv4 / IPv6 preferred address values: #4985, #4986
- Fix potential deadlock when OpenStreamSync context is cancelled: #5037 (thanks to @sukunrt for a very helpful review!)
- Stateless resets are now properly detected when zero-length Connection IDs are used: #5027
Behind The Scenes
- As in the last couple of releases, we continued our ongoing effort to migrate away from the Ginkgo test suite (tracking issue #3652). The
quicpackage is now fully migrated (#4957, #4969, #5033, #5040, #5054). There are still ~5300 LOC of Ginkgo tests to clean up, mainly in thecongestionand thehttp3package. - We've fully migrated from
math/randandgolang.org/x/exp/randto the newmath/rand/v2package: #5044, #5045, #5046
v0.50.1
This patch release contains a backported fix for a remote-triggered panic in the probe packet loss detection logic: #4998.
Full Changelog: v0.50.0...v0.50.1
v0.50.0
This release implements server-side path-probing (as described in section 9 of RFC 9000): #4932, #4933, #4935, #4938, #4939, #4940, #4941, #4944, #4947, #4959.
When the server receives a packet for an existing connection from a different IP address / port, it first needs to probe the new path before it can send packets on that path. This happens when the client experiences a NAT rebinding, and when the client attempts to migrate to a new connection. Previous versions of quic-go would accept the packets from the new path, but never switch to the new path.
Note that the client side connection migration logic (#234) is not yet implemented in quic-go (but we're working on it!).
Major Changes
- use the new crypto/tls 0-RTT API that we helped design in 2023: #4953
- use a ringbuffer to store received packets, significantly reducing memory consumption: #4929
- according to our Go version policy, we removed support for Go 1.22. quic-go now requires Go 1.23 or Go 1.24: #4880
- the connection timer logic was refactored, enabling future changes to this code path: #4927
Other Fixes
- fix busy-looping when pacing packets and the send queue blocks: #4943
- don't drop undecryptable packets when deriving 2 sets of keys at the same time (i.e. when resuming a 0-RTT connection): #4950
Go 1.24 FIPS 140-3 Caveats
Go 1.24 made several changes related to FIPS 140-3 compliance. Among others, it introduced a fips-only mode (enabled by setting GODEBUG="fips140=only").
It is not possible to use quic-go in fips-only mode, since the QUIC RFC requires initializing an AES GCM cipher with a fixed nonce, which is considered unsafe according to FIPS 140-3, or at least the Go team's interpretation thereof. See #4894 and the discussion on Go issue #69536.
Before v0.50.0, quic-go would initialize the AES cipher on init, leading to a panic when using fips-only mode. For v0.50.0 we changed this behavior to lazy initialization (#4916). Note that this still means it's not possible to use QUIC in fips-only mode.
Changelog
- ackhandler: remove unneeded error return from packet history iterator by @marten-seemann in #4917
- proxy: remove Proxy.LocalPort method by @marten-seemann in #4920
- proxy: rename to Proxy, refactor initialization by @marten-seemann in #4921
- proxy: add function to simulate NAT rebinding by @marten-seemann in #4922
- proxy: optimize packet sorting logic by @marten-seemann in #4923
- simplify handling of packet unpacking errors by @marten-seemann in #4924
- refactor connection error propagation by @marten-seemann in #4925
- refactor packet handling into a separate function by @marten-seemann in #4926
- congestion: migrate the pacer tests away from Ginkgo by @marten-seemann in #4929
- utils: add a method to reset the RTTStats for connection migration by @marten-seemann in #4930
- add a packet packer method to pack path probe packets by @marten-seemann in #4932
- add a method to change the remote address of the sendConn by @marten-seemann in #4933
- ackhandler: add path probe tracking logic to sent packet history by @marten-seemann in #4934
- implement connection ID handling for path probe packets by @marten-seemann in #4935
- fix flaky TestConnectionReceivePrioritization by @marten-seemann in #4936
- add a method to the sendQueue to send probe packets by @marten-seemann in #4939
- implement a path manager to track the validation status of new paths by @marten-seemann in #4938
- query MTU discoverer for increases after processing ACK frame by @marten-seemann in #4941
- http3: minor simplification of panic handling logic by @marten-seemann in #4942
- use a ringbuffer to store received packets in the connection by @marten-seemann in #4928
- refactor connection timer logic by @marten-seemann in #4927
- ackhandler: implement timer logic for path probe packets by @marten-seemann in #4940
- fix busy-looping when pacing and the send queue blocks by @marten-seemann in #4943
- add a way to reset the MTU discoverer by @marten-seemann in #4947
- migrate the connection ID generator tests away from Ginkgo by @marten-seemann in #4948
- implement server-side path validation logic by @marten-seemann in #4944
- keep undecryptable packets when deriving 0-RTT and handshake keys by @marten-seemann in #4950
- ci: update golangci-lint to v1.64.4 by @marten-seemann in #4951
- bump go.mod version to Go 1.23, run 1.23 and 1.24 on CI by @marten-seemann in #4880
- ackhandler: use Go iterators to iterate over sent packets by @marten-seemann in #4952
- handshake: use new crypto/tls 0-RTT API by @marten-seemann in #4953
- ackhandler: fix handling of lost path probes on loss timer by @marten-seemann in #4956
- remove unneeded tracking of acknowledgments for PATH_CHALLENGEs by @marten-seemann in #4959
Full Changelog: v0.49.0...v0.50.0