Commit Graph

6856 Commits

Author SHA1 Message Date
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
Marten Seemann
9e1afd4fb4 migrate the streams map tests away from Ginkgo (#5040) 2025-04-19 15:53:40 +02:00
Marten Seemann
79e5680890 migrate the retransmission queue tests away from Ginkgo (#5054) 2025-04-19 14:47:17 +02:00
Marten Seemann
2cfc9b8596 refactor retransmission queue to enable splitting of 1-RTT CRYPTO frames (#5058) 2025-04-19 14:14:55 +02:00
Marten Seemann
0c1db893f9 fix flaky TestStreamsMapOutgoingRandomizedOpenStreamSync (#5056) 2025-04-19 12:55:58 +02:00
Marten Seemann
02fea84c12 simplify the API of the retransmission queue (#4793) 2025-04-19 10:35:16 +02:00
Marten Seemann
7548cc069a protocol: fix flaky TestVersionGreasing (#5051) 2025-04-19 10:19:00 +02:00
Marten Seemann
267cca773b switch from math/rand to math/rand/v2 (#5045)
* switch from math/rand to math/rand/v2

* switch away from golang.org/x/exp/rand
2025-04-19 09:01:22 +02:00
Marten Seemann
c60438c528 migrate the outgoing streams map tests away from Ginkgo (#5033) 2025-04-19 08:12:35 +02:00
Marten Seemann
f4c478b627 fix potential deadlock when OpenStreamSync context is cancelled (#5037)
* fix potential deadlock when OpenStreamSync context is cancelled

* fix race condition when closing
2025-04-19 07:48:18 +02:00
Marten Seemann
b645ce35a2 use a slice instead of a map to track waiting OpenStreamSync calls (#5036)
Using a slice is faster than using a map, unless thousands
of OpenStreamSync calls are cancelled at the same time.
2025-04-19 04:17:53 +02:00
Marten Seemann
cda52a1e36 evict old paths when the client probes a new path (#5034)
* store paths in a slice, not a map

No functional change expected.

* save the timestamp of the last received packet for a path

* evict old paths

* reduce the path timeout to 5s
2025-04-19 04:10:54 +02:00
Marten Seemann
7cffd500f1 clarify that Config.InitialPacketSize constitutes a lower limit (#5047) 2025-04-14 15:44:32 +02:00
Marten Seemann
0894931c64 protocol: use math/rand/v2 to generate greased versions (#5046) 2025-04-14 14:30:04 +02:00
Marten Seemann
e3f1b7c410 switch packet packer to math/rand/v2 (#5044) 2025-04-14 12:12:48 +02:00
Mark Rushakoff
e2031b7aeb use clickable links in documentation, fix list styling (#4955)
* Update comment styles

1. Use doc links (the square brackets around identifiers) to make
   clickable links on pkg.go.dev (https://go.dev/doc/comment#doclinks)
2. Indent lists so that they are rendered properly -- at which point go
   fmt updates the bullet character to a dash
   (https://go.dev/doc/comment#lists)
3. Add a couple missing punctuation marks

These all will improve the experience of browsing the quic-go docs on
pkg.go.dev.

* ignore SA1019 for the ConnectionTracingID

* ci: exclude ConnectionTracing(ID, Key) from staticlint in http3

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-04-14 07:44:29 +02:00
Marten Seemann
0ac0c1e72c improve documentation for the ConnectionIDGenerator (#5043) 2025-04-14 06:41:17 +02:00
Marten Seemann
848c355079 simplify path probe PING frame packing logic (#5028)
* simplify path probe PING frame packing logic

* also pack PTO probe packets for Initial and Handshake
2025-04-14 05:47:58 +02:00
Marten Seemann
97da280142 implement closing of paths probed for connection migration (#4979) 2025-04-13 13:59:43 +02:00
Marten Seemann
26ba8d978f fix flaky TestServerCreateConnection (#5039) 2025-04-13 07:20:52 +02:00
Peter Wu
23ec5b957c fix flaky TestDatagramLoss (#5017)
Fixes #4784
2025-04-12 10:59:14 +02:00
Marten Seemann
57830ad295 migrate the incoming streams map tests away from Ginkgo (#4957) 2025-04-12 08:11:34 +02:00
Marten Seemann
213b54b010 fix flaky TestServer0RTTReordering (#5032) 2025-04-12 06:29:11 +02:00
Marten Seemann
a15ea40aa4 fix flaky TestConnectionPathValidation (#5030) 2025-04-12 05:19:08 +02:00
Marten Seemann
c9c2c86516 fix flaky TestDial test (#5029)
* give the kernel some time to free the socket

* remove problematic assertion

The listen function is started in a Goroutine, hence we
can’t be sure it’s already started.
2025-04-12 04:39:47 +02:00
Marten Seemann
ef2b87f5d5 detect stateless resets for zero-length connection IDs (#5027) 2025-04-11 15:23:53 +02:00
Marten Seemann
e76621f75a register stateless reset tokens for connection IDs used on paths (#5023)
* register stateless reset tokens for connection IDs used on paths

* retire path stateless reset tokens on closing
2025-04-09 04:31:41 +02:00
Marten Seemann
84aba71c86 refactor connection ID manager to use a slice instead of a linked list (#5022)
* refactor connection ID manager to use a slice instead of a linked list

* add a benchmark test for the connection ID manager
2025-04-08 12:02:58 +02:00
Marten Seemann
79d546379b rename ClientHelloInfo to ClientInfo (#5016)
There’s no ClientHello (which is a TLS concept) involved here.
2025-03-31 16:15:09 +02:00
Marten Seemann
3fd4f95a3b http3: simplify ConfigureTLSConfig (#5011)
The previous logic allowed for setting different ALPN
values depending on the QUIC version in use. This was
needed to set the draft ALPN value before publication of
the RFC.
2025-03-30 15:17:39 +02:00
Marten Seemann
1d8f3f281a ci: update golangci-lint to v2 (#5007) 2025-03-30 07:16:14 +02:00
Marten Seemann
4290638b55 quicvarint: refactor ifs into a switch statement (#5012)
No functional change expected.
2025-03-29 17:03:18 +01:00