Commit Graph

6441 Commits

Author SHA1 Message Date
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
Marten Seemann
8a3d90fc22 ci: set timeout for jobs (#4538) 2024-05-28 22:08:50 -07:00
Marten Seemann
723a188dde remove unneeded stream context cancellation on shutdown (#4535)
The connection already cancels the base context, so we don't need to manually
cancel the stream context (which is derived from the connection context).
2024-05-27 21:43:27 -07:00
Marten Seemann
ae90c76822 http3: fix flaky Extended CONNECT unit test (#4537) 2024-05-27 21:43:01 -07:00
Marten Seemann
21b643eeea deprecate the ConnectionTracingKey (#4532)
Applications can set their own tracing key using Transport.ConnContext.
2024-05-27 19:24:10 -07:00
Marten Seemann
0d1e27d77c introduce Transport.ConnContext, use client's context on the connection (#4507)
* introduce Transport.ConnContext, use client's context on the connection

* panic if ConnContext returns nil
2024-05-26 21:30:19 -07:00
George
e2fbf3cdcd http3: fix memory leak in stream state tracking (#4523)
* fix(http3): handle streamStateSendAndReceiveClosed in onStreamStateChange

Signed-off-by: George MacRorie <me@georgemac.com>

* refactor(http3): adjust stateTrackingStream to operate over streamClearer and errorSetter

* test(http3): remove duplicate test case

* chore(http3): rename test spies to be mocks

---------

Signed-off-by: George MacRorie <me@georgemac.com>
v0.44.0
2024-05-18 19:15:32 -07:00
Z.SX
f3cecf952e http3: rename ListenAndServe to ListenAndServeTLS (#4522)
* http3: rename ListenAndServe to ListenAndServeTLS

* http3: fix golanglint

---------

Co-authored-by: Shunxin Zhang <shunxin.zhang@shopee.com>
2024-05-14 18:32:56 -07:00
Marten Seemann
e41d1f9dd7 logging / qlog: add support for DPLPMTUD (#4517)
* logging / qlog: add support for DPLPMTUD

* improve the MTU discovery integration test
2024-05-14 02:37:54 -07:00
Marten Seemann
056a332ac4 retry the PMTUD integration test up to 3 times (#4519)
This test is very sensitive to packet loss, as the loss of a single Path MTU
probe packet makes DPLPMTUD clip the assumed MTU at that value.
2024-05-14 02:14:02 -07:00
Marten Seemann
2557fb98b2 initialize the MTU discoverer when processing the transport parameters (#4514)
On the client side, we always use the configured packet size. This comes
with the risk of failing the handshake if the path doesn't support this
MTU. If the server sends a max_udp_payload_size that's smaller than this
size, we can safely ignore this: Obviously, the server still processed
the (fully padded) Initial packet, despite claiming that it wouldn't do
so.

On the server side, there's no downside to using 1200 bytes until we
received the client's transport parameters:
* If the first packet didn't contain the entire ClientHello, all we can
do is ACK that packet. We don't need a lot of bytes for that.
* If it did, we will have processed the transport parameters and
initialized the MTU discoverer.
2024-05-13 22:50:26 -07:00
Marten Seemann
508b402a19 update all golang.org/x dependencies (#4506) 2024-05-10 20:02:07 -07:00
Marten Seemann
f3d76b39bf make the initial packet size configurable (#4503) 2024-05-08 21:41:08 -07:00
Marten Seemann
e90a0d4e03 increase initial packet size to 1280 bytes (for both IPv4 and IPv6) (#4500) 2024-05-08 20:55:19 -07:00
Marten Seemann
d1c1f18e4c wire: write configured value of max_udp_payload_size transport parameter (#4501) 2024-05-07 21:30:28 -07:00
Marten Seemann
66f968b9ff reject sending of DATAGRAM frames that exceed the current MTU (#4497)
* reject sending of datagrams that exceed the current MTU

* check datagram size in PMTUD integration test
2024-05-07 00:06:00 -07:00
Marten Seemann
f1b473d925 add an integration test for DPLPMTUD (#4498)
* add an integration test for DPLPMTUD

* use a v4-only socket in DPLPMTUD test

* increase DPLPMTUD test timeout
2024-05-06 22:15:20 -07:00
Marten Seemann
4f4da0423f ci: disable exhaustive linter for test files (#4499) 2024-05-06 21:36:22 -07:00
Marten Seemann
2ed1593b6e ci: update golangci-lint-action to v6 and golangci-lint to v1.58.0 (#4494)
* ci: update golangci-lint-action to v6 and golangci-lint to v1.58.0

* use issues.exclude-files instead of run.skip-files

* rename vet to govet
2024-05-06 19:05:38 -07:00
Marten Seemann
475b4f02cb http3: ignore deadline errors when tracking QUIC stream states (#4495) 2024-05-06 19:03:41 -07:00
Marten Seemann
03a32d0daa ci: run benchmarks (#4492) 2024-05-05 06:48:56 -07:00
Marten Seemann
5aac43549b http3: fix race condition when creating state tracking stream (#4493) 2024-05-05 06:34:55 -07:00
Marten Seemann
83eeb9cc66 fix incorrect reuse of UDP connection in handshake benchmark (#4491) 2024-05-05 06:17:08 -07:00
Marten Seemann
b4210f8459 wire: reduce allocations when parsing transport parameters (#4483) 2024-05-05 05:48:48 -07:00
Marten Seemann
347a4afc51 wire: refactor header parsing to use quicvarint.Parse (#4481)
* wire: add benchmark tests for initial and retry header parsing

* wire: refactor header parsing to use quicvarint.Parse

* wire: simplify tracking of parsed length for Long Header parsing
2024-05-05 05:48:06 -07:00
Marten Seemann
f12ee48617 wire: use quicvarint.Parse when parsing frames (#4484)
* wire: add benchmarks for the frame parser

* wire: use quicvarint.Parse when parsing frames

* wire: always use io.EOF for too short frames
2024-05-05 04:28:28 -07:00
Marten Seemann
1514095afb wire: use quicvarint.Parse to when parsing transport parameters (#4482)
* wire: add a benchmark for parsing of transport parameters

* wire: use quicvarint.Parse to when parsing transport parameters
2024-05-05 04:26:51 -07:00
Marten Seemann
bb6f066aa5 http3: use the stream context to detect when the send side is closed (#4489) 2024-05-04 19:15:35 -07:00
Marten Seemann
c7b58b568f http3: refuse to send datagrams associated with a closed stream (#4488)
It's only valid to send datagrams associated with a stream whose send
direction is not closed.
2024-05-04 17:48:07 -07:00
Marten Seemann
b7a02137f9 fix capture of loop variable in connection probe packet tests (#4486) 2024-05-04 15:49:10 -07:00
Marten Seemann
a3d36f1cbb http3: reject reserved frame types (#4467) 2024-05-04 15:23:40 -07:00
Robin Thellend
a5adbd44c7 http3: pass original Conn to ConnContext (#4480)
* http3: Pass original Conn to ConnContext

https://github.com/quic-go/quic-go/issues/4479

* Update test to check conn value
2024-05-03 16:17:39 -07:00
Marten Seemann
3122ca009b http3: avoid allocation when parsing the datagram's quarter stream ID (#4478) 2024-05-03 20:13:38 +08:00
Marten Seemann
11111228cf quicvarint: add function to parse a varint from a byte slice (#4475) 2024-05-03 04:58:18 -07:00
Marten Seemann
8de22b2468 http3: allow io.EOF when parsing a capsule fails on the first byte (#4476) 2024-05-03 04:14:18 -07:00
dependabot[bot]
0d565fc384 ci: bump golangci/golangci-lint-action from 4 to 5 (#4472)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-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-04-29 02:00:59 -07:00
WeidiDeng
93c4785521 http3: sniff Content-Type when flushing the ResponseWriter (#4412)
* try to sniff content-type as long as the data is not written to the client

* only write when body is allowed

* fix tests

* fix tests

* fix header count

* fix lint

* merge from upstream

* merge updates from master

* Update http3/response_writer.go

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

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
v0.43.0
2024-04-27 07:26:21 -07:00