Commit Graph

6787 Commits

Author SHA1 Message Date
Marten Seemann
77c401dcbb http3: only retry requests for which it is safe to do so (#5141)
* add an integration test for HTTP/3 redialing logic

* http3: only retry requests for which it is safe to do so
2025-05-16 05:22:13 +02:00
Marten Seemann
d7ca54c602 fix flaky TestHandshakeCloseListener (#5140) 2025-05-11 06:54:28 +02:00
Marten Seemann
fe02bc2b66 http3: fix flaky TestClientRequestLengthLimit (#5137) 2025-05-11 06:12:26 +02:00
Marten Seemann
50dd857c57 http3: migrate the connection tests away from Ginkgo (#5133) 2025-05-10 16:17:25 +02:00
Marten Seemann
6f8460a821 http3: keep datagram receive loop running on datagram for unknown stream (#5136) 2025-05-10 14:41:47 +02:00
Marten Seemann
3f97a011a7 http3: migrate the client tests away from Ginkgo (#5096)
* http3: migrate the client tests away from Ginkgo

* http3: add a client settings test
2025-05-10 05:24:21 +02:00
Marten Seemann
8474eddd3a use the slices package to simply QUIC version comparisons (#5130)
No functional change expected.
2025-05-09 06:24:45 +02:00
Marten Seemann
1725cb0878 http3: close QUIC listeners created by Server on graceful shutdown (#5101) 2025-05-08 08:22:11 +02:00
Marten Seemann
8296ba7d19 http3: don't close QUIC listeners created by the application (#5129) 2025-05-08 07:40:23 +02:00
Marten Seemann
f3f476a908 never close accepted connections when the listener is closed (#5108) 2025-05-06 05:18:44 +02:00
Marten Seemann
3d183f0e19 remove the changelog (#5074) 2025-05-06 05:05:59 +02:00
Marten Seemann
cfc6c16f36 fix race condition in tests when setting the key update interval (#5121)
* fix race conditions in tests when setting the key update interval

* remove test for running transports and handshakes
2025-05-06 04:45:27 +02:00
Marten Seemann
4c6aca6b43 remove stray assertion that handshakes are running from tests (#5123)
The RunHandshake method this function was basing its assertion on was
removed a long time ago.
2025-05-06 09:13:38 +07:00
Zxilly
21e5646e53 fix ECN control messages on big-endian architectures (#5105)
* fix: correct select low bits when dealing with ecn

* fix: revert action on ipv4

* chore: use uint8

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* fix: use binary to handle byte order

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-05-05 17:12:03 +02:00
Marten Seemann
37d0a823d8 ci: only apply the interop Docker build concurrency group for pushes (#5120)
There’s no risk that the uploaded Docker image gets
overwritten for pull requests, since pull requests don’t
upload the image.
2025-05-05 13:27:59 +02:00
Marten Seemann
57e46f8a4c split SNI and ECH extensions in the ClientHello (#5107)
* create a new type for crypto stream used for Initial data

This currently the exact same implementation as the other
streams, thus no functional change is expected.

* handshake: implement a function to find the SNI and the ECH extension

* move the SNI parsing logic to the quic package

* implement splitting logic

* generalize cutting logic

* introduce QUIC_GO_DISABLE_CLIENTHELLO_SCRAMBLING

* improve testing
2025-05-05 13:04:10 +02:00
Marten Seemann
11ccfff388 ci: remove stray GITREF env from Docker interop workflow (#5119) 2025-05-05 12:56:10 +02:00
Marten Seemann
2082d2c6b9 move connection tracking into the Transport (#5113) 2025-05-05 05:05:17 +02:00
dependabot[bot]
6ef55ca271 ci: bump golangci-lint-action to v8 and golangci-lint to v2.1.6 (#5118)
* build(deps): bump golangci/golangci-lint-action from 7 to 8

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 7 to 8.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v7...v8)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* bump golangci-lint to v2.1.6

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-05-05 04:45:38 +02:00
Marten Seemann
44207b8e72 http3: reset request streams accepted after graceful shutdown (#5116)
* http3: reset request streams accepted after graceful shutdown

The server needs to let the client know that these streams
are not getting processed, using the H3_REQUEST_REJECTED
error code.

* add an integration test for graceful shutdown stream cancellations
2025-05-05 04:28:01 +02:00
Marten Seemann
9b3ff059fc delete closed connections after 3 PTOs (#5117)
In most cases, this should be earlier than the current
timeout value of 5s.
2025-05-04 12:51:39 +02:00
Marten Seemann
be709c10fd ci: also build the interop image on pull requests, but skip pushing (#5115)
* ci: also build the interop image on pull requests, but skip pushing

* use checked out code for interop Docker build
2025-05-04 07:07:44 +02:00
Marten Seemann
e1a1251c84 http3: send GOAWAY frame in a new Goroutine (#5114)
Sending might block if the peer didn't grant enough flow
control credit.
2025-05-04 06:21:03 +02:00
Marten Seemann
a0a641d59a ci: set a 30 minute timeout for the interop Docker job (#5112) 2025-05-04 05:35:46 +02:00
Marten Seemann
4d39fc31c5 simplify tracking of Transports for connection migration (#5111)
No functional change expected.
2025-05-03 16:06:23 +02:00
Marten Seemann
97e7657df5 delete retired connection IDs after 3 PTOs (#5109) 2025-05-03 14:24:40 +02:00
Marten Seemann
55229d3f21 remove periodic logging functionality from packet handler map (#5110) 2025-05-03 14:11:57 +02:00
Marten Seemann
d7b8447e0e fix dequeuing logic for tiny CRYPTO frames (#5104)
For very small sizes, cryptoStream.PopCryptoStream could
have returned CRYPTO frames larger than the requested size.

Instead, it should return a nil frame.
2025-05-01 18:35:11 +02:00
Marten Seemann
9d06679273 http3: migrate the server tests away from Ginkgo (#5085)
* http3: migrate the server tests away from Ginkgo

* http3: add a test for server settings
2025-04-30 06:53:37 +02:00
Zxilly
e4bb2dbd55 fix parsing of interface index in packet info cmsg on big endian architectures (#5094) 2025-04-30 04:30:35 +02:00
Marten Seemann
41cc01890d http3: return http.ErrServerClosed for ServeQUICConn after Server.Close (#5095) 2025-04-29 12:05:14 +02:00
Marten Seemann
5daf5b6535 http3: remove Alt-Svc entry when Server.Serve returns (#5093) 2025-04-29 05:58:10 +02:00
Marten Seemann
dae68d7ca0 http3: use a slice instead of a map to store active listeners (#5087)
* http3: use a slice instead of a map to store active listeners

This list will be relatively short, therefore it will be
more performant to use a slice instead of a map.

No functional change expected.

* http3: rename listenerInfo to listener
2025-04-29 04:08:41 +02:00
TheoTechnicguy
a9d8093eaf http3: fix documentation for Hijacker and HTTPStreamer (#5089)
* http3: update documentation for `Hijacker`

The documentation for `Hijacker` seems to be legacy from
[v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This
commit updates the documentation to reflect the current API use.

* http3: update documentation for `HTTPStreamer`

The documentation for `HTTPStreamer` seems to be legacy from
[v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This
commit updates the documentation to reflect the current API use.
2025-04-29 03:55:43 +02:00
Marten Seemann
f2b1842d52 http3: use httptest.NewRequest (#5086)
No functional change expected.
2025-04-29 03:45:04 +02:00
Marten Seemann
597fee0b34 ackhandler: migrate the packet number generator tests away from Ginkgo (#5081) 2025-04-27 11:27:28 +02:00
Marten Seemann
e423d4d184 http3: migrate the frames tests away from Ginkgo (#5067) 2025-04-27 09:44:32 +02:00
Marten Seemann
d84d985b92 http3: migrate the body tests away from Ginkgo (#5078) 2025-04-26 15:48:34 +02:00
Marten Seemann
7437cff1e0 http3: migrate the datagram tests away from Ginkgo (#5076) 2025-04-24 08:23:56 +02:00
Marten Seemann
d678f9a86c http3: migrate the response writer tests away from Ginkgo (#5075) 2025-04-23 13:52:22 +08:00
Marten Seemann
3d3922da47 http3: migrate the capsule tests away from Ginkgo (#5073) 2025-04-22 14:03:32 +02:00
Marten Seemann
ad0ffcbd37 http3: check response writer for http.ResponseController methods (#5071) 2025-04-22 13:37:26 +02:00
Marten Seemann
89d9984156 http3: simplify request writer by writing to an io.Writer (#5070)
It’s always preferable to use the most minimal interface.
2025-04-22 13:24:46 +02:00
Marten Seemann
f1c7a5df73 http3: migrate the headers tests away from Ginkgo (#5068) 2025-04-22 12:54:31 +02:00
Marten Seemann
4c9f6df723 http3: migrate the request writer tests away from Ginkgo (#5069) 2025-04-22 12:53:48 +02:00
Marten Seemann
b3f55bb7b7 use assert.AnError consistently in tests (#5066)
No functional change expected.
2025-04-21 03:52:08 +02:00
Marten Seemann
d35b5ac187 use ed25519 instead of RSA in tests and examples (#5050)
Also adds a golangci-lint depguard rules that forbids
importing crypto/rsa.
v0.51.0
2025-04-20 05:55:08 +02:00
Marten Seemann
03e9359e38 improve documentation of errors returned from connection and streams (#5061)
* improve documentation of errors returned from the connection and streams

* further wordsmithing
2025-04-20 04:56:11 +02:00
Marten Seemann
65d75f1ffb fix panic when probe packet containing a PATH_RESPONSE is lost (#5063) 2025-04-20 04:49:59 +02:00
Marten Seemann
a1aa369464 don't use net.Errors for streams map error (#5060) 2025-04-19 16:16:47 +02:00