Commit Graph

6477 Commits

Author SHA1 Message Date
Marten Seemann
f5ceb73171 handshake: generate CRYPTO_ERRORs for internal_error TLS alerts (#4601)
* handshake: generate CRYPTO_ERRORs for internal_error TLS alerts

* remove stray comment
2024-08-03 17:04:03 -07:00
Marten Seemann
a147bee190 simplify frame queuing logic on 0-RTT rejection (#4607)
Even though we currently don't do so, sending MAX_DATA, MAX_STREAM_DATA
and MAX_STREAMS is allowed in 0-RTT.
2024-08-03 17:00:41 -07:00
Marten Seemann
86d5044eec remove trivial mock implementation of the cryptoStream interface (#4620)
* remove trivial mock implementation of the cryptoStream interface

No functional change expected.

* fix tests
2024-08-03 16:57:03 -07:00
Marten Seemann
e737d4a40e wire: speed up parsing of headers with arbitrary length connection IDs (#4618)
This is significantly faster:
name                                          old time/op    new time/op    delta
ArbitraryHeaderParsing/dest_8/_src_10-16        53.8ns ± 2%    27.4ns ± 2%  -49.01%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16      61.6ns ± 1%    33.3ns ± 3%  -46.00%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16    90.0ns ± 3%    54.8ns ± 5%  -39.09%  (p=0.008 n=5+5)

name                                          old alloc/op   new alloc/op   delta
ArbitraryHeaderParsing/dest_8/_src_10-16         72.0B ± 0%     24.0B ± 0%  -66.67%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16       96.0B ± 0%     48.0B ± 0%  -50.00%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16      320B ± 0%      272B ± 0%  -15.00%  (p=0.008 n=5+5)

name                                          old allocs/op  new allocs/op  delta
ArbitraryHeaderParsing/dest_8/_src_10-16          3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16        3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
2024-08-03 16:50:42 -07:00
Marten Seemann
87f2894af5 handshake: remove gomock tls.ClientSessionCache implementation (#4619) 2024-08-03 16:43:30 -07:00
Marten Seemann
bb4eb8597c reduce allocations when handling crypto data (#4615) 2024-08-02 21:01:53 -07:00
Marten Seemann
b8ea5c7981 simplify generation of STREAM_DATA_BLOCKED frames (#4608)
The stream always gets blocked at the current write offset. There's no
need to return this offset from the flow controller.
2024-08-01 13:08:09 -07:00
sukun
8d821f4bc8 mark stream completed when CancelWrite is called after receiving STOP_SENDING (#4605)
* garbage collect stream when CancelWrite is called after receiving STOP_SENDING

* review comments

* Hold lock while checking isNewlyCompleted

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
2024-08-01 13:07:06 -07:00
Marten Seemann
047cc90f42 ackhandler: reduce allocations for tracking sent packets (#4602) 2024-07-31 16:37:05 -07:00
Marten Seemann
42f04d4e02 refactor frame packing to logic to not access the streams map (#4596)
* avoid accessing the streams map when packing stream data

* avoid accessing the streams map when packing flow control frames

* remove streamGetter interface
2024-07-28 12:32:54 -07:00
Marten Seemann
fc79a77ffe remove unused framer interface (#4599)
No functional change expected.
2024-07-24 16:55:09 -07:00
Marten Seemann
9b70412b0f remove mock TokenStore implementation (#4597)
No functional change expected.
2024-07-24 16:28:01 -07:00
Marten Seemann
8451b0afd7 utils: remove scarcely used time helper functions (#4593) 2024-07-23 14:16:12 -07:00
Marten Seemann
e179048526 wire: simplify packet number parsing, remove utils.ByteOrder interface (#4590) 2024-07-21 14:50:21 -07:00
Marten Seemann
29550811b4 remove trivial IPv4 helper function (#4591) 2024-07-21 14:50:03 -07:00
Marten Seemann
5f8d146836 wire: optimize parsing of long header packets (#4589) 2024-07-21 14:22:32 -07:00
Marten Seemann
bc642d872d simplify handling of CRYPTO frames, remove cryptoDataHandler interface (#4588) 2024-07-21 11:59:08 -07:00
Marten Seemann
72092fbc29 move connection logging to a separate file, absorb logutils package (#4586)
No functional change expected.
2024-07-21 11:31:32 -07:00
Marten Seemann
c40d4ccb7f ackhandler: optimize received packet tracking (#4584)
* ackhandler: use slice instead of linked list to track received packets

* ackhandler: add benchmark test for received packet history

* ackhandler: use the slices package for slice manipulations
2024-07-20 08:14:26 -07:00
Marten Seemann
82b275212c handshake: remove unneeded tokenProtector interface (#4585) 2024-07-19 21:45:20 -07:00
Marten Seemann
7825250d3f ci: use Go 1.23rc2 for unit and integration tests (#4571)
* ci: use Go 1.23rc1 for unit and integration tests

* handshake: avoid using linkname to access crypto/tls.cipherSuiteTLS13ByID

* ci: use use Go 1.23rc2
2024-07-18 10:20:54 -07:00
Marten Seemann
b52c33939d introduce a StreamLimitReachedError for Connection.Open{Uni}Stream (#4579)
Using a concrete type is preferable to relying on interpreting the
return values from net.Error.Timeout and net.Error.Temporary, especially
since the latter has been deprecated since Go 1.18.
2024-06-28 06:58:28 -07:00
Marten Seemann
7379f1fd5e handshake: ignore unknown QUIC events from crypto/tls (#4577) 2024-06-28 06:24:50 -07:00
Marten Seemann
8f1110450b use a net.ErrClosed when returning Accept from a closed server (#4569) 2024-06-24 03:33:34 -07:00
dependabot[bot]
2da1681699 ci: bump docker/build-push-action from 5 to 6 (#4576)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
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-06-24 00:09:49 -07:00
Mathis Engelbart
b4f3839fce fix stream documentation for StreamError return values (#4575) 2024-06-23 19:33:56 -07:00
Marten Seemann
2a082f973a http3: allow re-dialing of connection after a dial error (#4573)
* http3: do not cache dial error

* add an integration test

* http3: add a unit test for dial failures

---------

Co-authored-by: 世界 <i@sekai.icu>
2024-06-22 21:38:49 -07:00
Marten Seemann
10f8bd4e06 http3: fix race condition between Server.Serve and Server.Close (#4572) 2024-06-23 01:13:56 +08:00
Marten Seemann
1cbd54f087 example: remove Dockerfile (#4568)
This Dockerfile adds very little value.
2024-06-15 22:01:08 -07:00
Marten Seemann
b19f2f9e3a metrics: use the default metrics tracer in integration tests (#4562) 2024-06-10 14:58:47 +08:00
Marten Seemann
8cae5d80ea metrics: create a new tracer on every call of DefaultConnectionTracer (#4560) 2024-06-07 07:20:20 -07:00
Marten Seemann
4d0562d13c metrics: add an example Grafana dashboard (#4559)
* metrics: add an example Grafana dashboard

* metrics: rename Handshake Duration to Handshake Latency

Co-authored-by: sukun <sukunrt@gmail.com>

---------

Co-authored-by: sukun <sukunrt@gmail.com>
v0.45.0
2024-06-06 02:13:35 -07:00
Marten Seemann
0c842975f4 fix incorrect statement about Config.DisablePathMTUDiscovery (#4558) 2024-06-05 19:23:53 -07:00
Marten Seemann
cc9a5ee744 qlog: rename DefaultTracer to DefaultConnectionTracer (#4556) 2024-06-05 03:50:01 -07:00
Marten Seemann
91221b4a05 metrics: simplify constructor for the default connection tracer (#4555) 2024-06-05 03:16:18 -07:00
Marten Seemann
44e0147f2e pass a context to Transport.ConnContext (#4536)
* pass a context to Transport.ConnContext

This context is cancelled when the QUIC connection is closed, or when
the QUIC handshake fails. This allows the application to easily build
and garbage collect a map of active connections.

* correctly handle fresh contexts returned from ConnContext
2024-06-04 21:37:18 -07:00
Marten Seemann
07acaad2f7 add context to EarlyConnection.NextConnection, handle handshake failures (#4551) 2024-06-04 20:51:54 -07:00
Marten Seemann
0db354456a make Path MTU Discovery resilient to random packet loss (#4545) 2024-06-04 02:10:11 -07:00
Marten Seemann
950de0d8ed Merge pull request #4534 from quic-go/prometheus
add some Prometheus metrics
2024-06-04 17:08:21 +08:00
Marten Seemann
a620f1a214 metrics: save the reason a connection was closed 2024-06-04 13:24:25 +08:00
Marten Seemann
685c1322fd metrics: measure the handshake duration 2024-06-04 13:24:25 +08:00
Marten Seemann
2968b93ea8 metrics: add a very basic ConnectionTracer 2024-06-04 13:24:24 +08:00
Marten Seemann
a555a14ae3 metrics: make the Prometheus registerer configurable 2024-06-04 13:19:30 +08:00
Marten Seemann
e66a925d64 metrics: add a basic setup, collect metrics for the server 2024-06-04 13:19:29 +08:00
Marten Seemann
459a6f3df9 fix the server's 0-RTT rejection logic when using GetConfigForClient (#4550) 2024-06-03 03:42:58 -07:00
Marten Seemann
dea2eafd1d remove unused function parameter from qtls.SetupConfigForServer (#4549) 2024-06-03 00:12:12 -07:00
Marten Seemann
73a5370f3c use a chan instead of a context to track handshake completion (#4547)
No functional change expected.
2024-06-02 22:47:25 -07:00
Marten Seemann
5446b5f912 http3: use the connection, not the stream context, on the server side (#4510) 2024-06-03 10:23:35 +08:00
Marten Seemann
375fc59084 remove unused SetMax method on the mtuDiscoverer (#4543) 2024-05-31 22:00:15 -07:00
Marten Seemann
82a3847439 http3: fix another flaky Extended CONNECT test (#4539) 2024-05-28 22:57:43 -07:00