Marten Seemann
183d42a729
http3: pass tracing ID instead of quic.Connection to stream hijackers ( #4401 )
...
The stream hijackers only need to be able to associate the stream with
the underlying QUIC connection. They are not supposed to call any
functions on the quic.Connection. As such, the better API is to just
pass them a unique identifier.
2024-04-01 21:23:40 -07:00
Marten Seemann
27a06f32ce
introduce a ConnectionTracingID type for the ConnectionTracingKey ( #4400 )
...
This is a breaking API change. Unfortunately, context values are not
strongly typed, so users will have have to take to change their type
assertions.
2024-04-01 21:10:12 -07:00
Marten Seemann
f389b638d2
http3: reference the correct RFCs in doc comments ( #4399 )
2024-04-01 15:56:23 -07:00
Marten Seemann
18d6d2934b
don't set the Allow0RTT flag for the client in the HTTP integration test ( #4397 )
2024-03-31 14:45:00 -07:00
Marten Seemann
97d31dad39
http3: introduce a Settingser to query the client's SETTINGS ( #4389 )
...
The http.Request.Body can be type-asserted to a http3.Settingser. The
Settings method on this interface blocks until the client's SETTINGS
frame has been received.
2024-03-31 14:44:42 -07:00
Marten Seemann
d540f545b0
http3: reject duplicate QPACK decoder and encoder streams ( #4388 )
2024-03-24 14:17:11 -07:00
Marten Seemann
268208fbef
http3: refactor the client's and server's unidirectional stream handling ( #4387 )
...
The logic is almost identical, so it makes sense to refactor it into
a shared implementation.
2024-03-24 13:52:44 -07:00
Marten Seemann
49b9965525
http3: rename RoundTripper.QuicConfig to RoundTripper.QUICConfig ( #4385 )
2024-03-23 15:29:39 -07:00
Marten Seemann
89020e380a
http3: rename Server.QuicConfig to Server.QUICConfig ( #4384 )
2024-03-23 14:39:34 -07:00
Marten Seemann
a19f99e98b
add an integration test for 0-RTT GET requests ( #4386 )
2024-03-23 14:26:02 -07:00
Marten Seemann
7d902549b7
http3: fix capitalization of Server.SetQUICHeaders ( #4377 )
...
Server.SetQuicHeaders is deprecated now, and will be removed at some
point in the future.
2024-03-23 14:24:51 -07:00
Marten Seemann
684b80a23f
http3: don't modify any fields of the http.Request when doing 0-RTT ( #4379 )
2024-03-23 13:58:41 -07:00
Marten Seemann
603e07779a
http3: make it possible to send HEAD requests in 0-RTT ( #4378 )
2024-03-23 08:24:09 +10:00
Marten Seemann
e14dd2fe5b
http3: improve documentation for Server.SetQuicHeaders ( #4376 )
2024-03-21 17:24:37 -07:00
Marten Seemann
6325696fde
quicvarint: use int return value instead of internal protocol.ByteCount ( #4356 )
2024-03-19 14:56:55 -07:00
Marten Seemann
4a99b816ae
close connection when an abnormally large number of frames are queued ( #4369 )
...
Under normal circumstances, we should be able to send out control frames
right away, so we don't expect any queue to build up. To defend against
resource exhaustion attacks, we limit the control frame queue to 16384
elements.
v0.42.0
2024-03-17 17:29:00 -07:00
Marten Seemann
9971fedd42
use Transport.VerifySourceAddress to control the Retry Mechanism ( #4362 )
...
* use Transport.VerifySourceAddress to control the Retry Mechanism
This can be used to rate-limit handshakes originating from unverified
source addresses. Rate-limiting for handshakes can be implemented using
the GetConfigForClient callback on the Config.
* pass the remote address to Transport.VerifySourceAddress
2024-03-14 17:35:52 -07:00
Marten Seemann
497d3f58a5
http3: add a RoundTripOpt to check the server's SETTINGS frame ( #4355 )
...
For some requests, the client is required to check the server's HTTP/3
SETTINGS. For example, a client is only allowed to send HTTP/3 datagrams
if the server explicitly enabled support.
SETTINGS are sent asynchronously on a control stream (usually the first
unidirectional stream). This means that the SETTINGS might not be
available at the beginning of the connection. This is not expected to be
the common case, since the server can send the SETTINGS in 0.5-RTT data,
but we have to be able to deal with arbitrary delays.
For WebTransport, there are even more SETTINGS values that the client
needs to check. By making CheckSettings a callback on the RoundTripOpt,
this entire validation logic can live at the WebTransport layer.
2024-03-12 01:03:00 -07:00
Marten Seemann
ca787d6f00
add an AddrVerified field to the ClientHelloInfo ( #4360 )
...
* add an AddressVerified field to the ClientHelloInfo
* rename ClientHelloInfo.AddressVerififed to ClientHelloInfo.AddrVerififed
2024-03-11 05:00:25 -07:00
Marten Seemann
f1476390f2
update gomock to v0.4.0 ( #4361 )
2024-03-10 18:07:20 -07:00
Marten Seemann
06b421411d
remove unused ReceiveStream.CloseRemote method ( #4357 )
2024-03-09 02:29:43 -08:00
Marten Seemann
5fd5d7770d
Merge pull request #4305 from quic-go/qlog-tracer
...
add a qlog tracer for events outside of QUIC connections
2024-03-09 19:59:14 +09:30
Marten Seemann
30e01b9524
use the transport tracer in integration tests
2024-03-09 19:32:15 +09:30
Marten Seemann
55c05aceed
qlog: log sent packets outside of a QUIC connection
2024-03-09 19:32:15 +09:30
Marten Seemann
aff90a6ffa
qlog: log sent Version Negotiation packets
2024-03-09 19:32:15 +09:30
Marten Seemann
3a7a53fdb9
qlog: log packet drops outside of a QUIC connection
2024-03-09 19:32:15 +09:30
Marten Seemann
2abbd41806
qlog: introduce a basic tracer for non-connection events
2024-03-09 19:32:15 +09:30
the harder the luckier
ac1268911e
improve API documentation for OpenStreamSync ( #4352 )
...
* docs: improve API documentation for OpenStreamSync
Both `OpenStream` and `OpenStreamSync` themselves only create steam objects locally, but `OpenStreamSync` does not add document descriptions, which will cause ambiguity.
* additional description
2024-03-06 16:37:35 -08:00
Thijs van Dien
a70419b49f
unmap IPv4-mapped IPv6 addresses ( #4309 )
2024-03-05 01:45:53 -08:00
Marten Seemann
71f5ae5ecb
handshake: optimize AEAD handling for long header sealers and openers ( #4323 )
2024-03-03 04:33:10 -08:00
Marten Seemann
f856163f1e
handshake: embed the mask as an array into the aesHeaderProtector ( #4324 )
2024-03-03 04:32:32 -08:00
dependabot[bot]
067e7db750
ci: bump docker/setup-buildx-action from 2 to 3 ( #4349 )
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 04:30:28 -08:00
dependabot[bot]
dbbb6ca736
ci: bump docker/setup-qemu-action from 2 to 3 ( #4345 )
...
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action ) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases )
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:45:33 -08:00
dependabot[bot]
5a70d18c77
ci: bump docker/login-action from 2 to 3 ( #4348 )
...
Bumps [docker/login-action](https://github.com/docker/login-action ) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases )
- [Commits](https://github.com/docker/login-action/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: docker/login-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:45:01 -08:00
dependabot[bot]
b21bd58281
ci: bump docker/build-push-action from 4 to 5 ( #4347 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:37:06 -08:00
dependabot[bot]
60b4a9c630
ci: bump actions/upload-artifact from 3 to 4 ( #4346 )
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:36:31 -08:00
Sukun
d6269b71af
fix deadlock when concurrently closing server and transport ( #4332 )
...
* server: fix deadlock when closing concurrently with transport
* add test for checking no deadlock
2024-03-03 03:00:28 -08:00
Marten Seemann
ba1fbbe964
ci: enable Dependabot for GitHub Actions ( #4343 )
2024-03-03 00:15:49 -08:00
Marten Seemann
d41c0b68cd
http3: reject duplicate control streams opened by the client ( #4344 )
2024-03-02 23:52:52 -08:00
Marten Seemann
c5f7096f00
http3: reject duplicate control streams opened by the server ( #4342 )
2024-03-02 23:28:24 -08:00
Marten Seemann
9813766373
http3: send SETTINGS_ENABLE_CONNECT_PROTOCOL (for Extended CONNECT) ( #4341 )
2024-03-02 23:15:59 -08:00
Marten Seemann
0405634108
http3: don't automatically set RoundTripper.QuicConfig.EnableDatagrams ( #4340 )
...
If the user provides a quic.Config, we shouldn't modify it. Instead, we
should return an error if the user enables HTTP Datagrams but fails to
enable datagrams on the QUIC layer.
2024-03-02 22:39:21 -08:00
Marten Seemann
c786a46f42
remove unused perspective arg from packetHandlerMap.ReplaceWithClosed ( #4330 )
2024-02-10 19:27:51 -08:00
Marten Seemann
7b8ceaa264
remove unused getPerspective function from quicConn interface ( #4329 )
2024-02-10 19:05:27 -08:00
Marten Seemann
69fe37885f
reenable previously disabled server unit test ( #4328 )
2024-02-10 18:44:43 -08:00
Marten Seemann
07a17ffffb
remove unused GetVersion function from quicConn interface ( #4327 )
2024-02-10 18:38:38 -08:00
Marten Seemann
0a7823c991
ci: update golangci-lint to v1.56.1 and golangci-lint action to v4 ( #4326 )
2024-02-10 17:46:27 -08:00
Marten Seemann
284996e13c
qtls: protect the tls.ClientSessionCache implementation with a mutex ( #4319 )
...
This prevents a race condition when the underlying ClientSessionCache
provided by the application returns the same session ticket for multiple
connections. Reusing session tickets is explicitly recommended against
by both RFC 8446 and RFC 9001, but it's not forbidden. This fix only
benefits applications that compromise their users' privacy by reusing
session tickets.
2024-02-09 07:47:28 -08:00
Marten Seemann
4790797b58
only check for stateless resets if packet doesn't belong to a connection ( #4322 )
...
This technically violates the stateless reset handling logic described
in RFC 9000 section 10.3.1 (see comment), but it saves one map lookup in
the hot path.
2024-02-09 00:15:58 -08:00
Marten Seemann
02e4506c3b
handshake: add benchmarks for the Initial AEAD ( #4320 )
2024-02-08 23:56:46 -08:00