Commit graph

6336 commits

Author SHA1 Message Date
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
Marten Seemann
f54a32ec28
don't preallocate the slice for STREAM frames when composing a packet (#4314)
The slice will be allocated when STREAM frames are appended. By not
preallocating it is made sure that the slice is only created in cases
where STREAM frames are actually sent in this packet.
2024-02-08 20:53:24 -08:00
Marten Seemann
229ff4fa4c
ci: update Codecov action to v4 (#4321) 2024-02-08 19:55:24 -08:00
Marten Seemann
8e93770dd3
avoid lock contention when accepting new connections (#4313)
* avoid lock contention when accepting new connections

The server used to hold the packet handler map's lock while creating the
connection struct for a newly accepted connection. This was intended to
make sure that no two connections with the same Destination Connection
ID could be created.

This is a corner case: it can only happen if two Initial packets with
the same Destination Connection ID are received at the same time. If
the second one is received after the first one has already been
processed, it would be routed to the first connection. We don't need to
optimized for this corner case. It's ok to create a new connection in
that case, and immediately close it if this collision is detected.

* only pass 0-RTT to the connection if it was actually accepted
2024-02-08 19:34:42 -08:00
Marten Seemann
013949cda3
ci: update to Go 1.22.0 (#4312) 2024-02-07 18:15:56 -08:00
bt90
43baf2db7a
README: add frp to list of projects (#4316) 2024-02-07 18:06:12 -08:00
Marten Seemann
ab17a5df6a
qlog: rename generation to key_phase on key_updated and key_discarded (#4315) 2024-02-07 18:04:23 -08:00
Marten Seemann
c22a3c8e6f
handshake: validate HKDF-Expand-Label against crypto/tls implementation (#4311)
* handshake: validate HKDF-Expand-Label against crypto/tls implementation

* handshake: add a benchmark for HKDF-Expand-Label
2024-02-04 21:27:21 -08:00
Marten Seemann
dc49f5673b
fix flaky 0-RTT packet loss recovery test (#4306) 2024-02-02 22:19:33 -08:00
Marten Seemann
198de32ef6
don't enqueue stream for sending on reordered MAX_STREAM_DATA frames (#4269) 2024-02-02 22:02:13 -08:00
Marten Seemann
07ec3245bd
logging: add a Close function to the Tracer (#4298)
* logging: add a Close function to the Tracer

* close the Tracer when the Transport is closed
2024-02-02 21:12:15 -08:00
Marten Seemann
b675e34254
logging: add a Debug function to the Tracer (#4297) 2024-02-02 20:21:27 -08:00
Marten Seemann
225d2a3926
qlog: disentangle the ConnectionTracer from the qlog writer (#4300)
The qlog writer simply records events, puts them into a channel, and
consumes these events in a separate Go routine (by serializing them).

The ConnectionTracer is the one generating those events.
2024-02-02 02:00:15 -08:00
Marten Seemann
0344401de5
qlog: rename qlog.go to connection_tracer.go (#4301) 2024-02-02 01:45:51 -08:00
Marten Seemann
f3c4be6b01
qlog: remove unneeded mutex from the ConnectionTracer (#4299)
Events are appended to a channel, which is able to handle concurrect writes.
2024-02-01 15:57:07 -08:00
Marten Seemann
2fbe713bb6
protocol: don't capitalize Perspective.String (#4296) 2024-02-01 15:16:36 -08:00
Marten Seemann
0582e931a5
wire: optimize generation of Version Negotiation packets (#4278)
* wire: optimize generation of Version Negotiation packets

* protocol: optimize adding greased version numbers
2024-01-31 23:54:04 -08:00
Marten Seemann
fbaa941ea1
protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
69ba7acb9f
ackhandler: don't delay ACKs for Initial and Handshake packets (#4288)
* ackhandler: don't delay ACKs for Initial and Handshake packets

* ackhandler: embed the receivedPacketHistory
2024-01-31 19:13:53 -08:00
Marten Seemann
72c79dbdf5
testutils: expose aliases for all frame types (#4293) 2024-01-30 21:47:03 -08:00
Marten Seemann
86441f1fdc
ci: make Codecov ignore testutils and testdata (#4292) 2024-01-30 21:22:40 -08:00
Marten Seemann
e65e99f1d6
ci: remove unused depguard check for qtls (#4291)
Fortunately, qtls is a thing of the past.
2024-01-30 19:30:11 -08:00