Commit Graph

5768 Commits

Author SHA1 Message Date
Marten Seemann
ab6d664b43 rename frame.Write to frame.Append 2022-08-28 23:18:24 +03:00
Marten Seemann
3ca1001951 append to a byte slice instead of a bytes.Buffer when serializing frames 2022-08-28 23:18:06 +03:00
Marten Seemann
65dd82ad90 implement a quicvarint.Append method 2022-08-28 22:51:03 +03:00
Marten Seemann
07412be8a0 Merge pull request #3512 from lucas-clemente/null-connection-tracer
add a logging.NullTracer and logging.NullConnectionTracer
v0.29.0
2022-08-27 13:53:41 +03:00
Marten Seemann
cd87a64e1e use the logging.Null{Connection}Tracer in integration tests 2022-08-27 13:16:40 +03:00
Marten Seemann
c29276ef67 expose the Null{Connection}Tracer as types, not as variables 2022-08-27 13:08:48 +03:00
João Oliveirinha
66f6fe0b71 add support for providing a custom Connection ID generator via Config (#3452)
* Add support for providing a custom ConnectionID generator via Config

This work makes it possible for servers or clients to control how
ConnectionIDs are generated, which in turn will force peers in the
connection to use those ConnectionIDs as destination connection IDs  when sending packets.

This is useful for scenarios where we want to perform some kind
selection on the QUIC packets at the L4 level.

* add more doc

* refactor populate config to not use provided config

* add an integration test for custom connection ID generators

* fix linter warnings

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-24 04:06:16 -07:00
Marten Seemann
034fc4e09a fix typo in README 2022-08-24 01:21:47 -07:00
Marten Seemann
48779d053f add a logging.NullTracer 2022-08-22 13:21:35 +03:00
Marten Seemann
118a7dba5a add a logging.NullConnectionTracer
The NullConnectionTracer can be embedded, to make it easier to access just a
few of the calls.
2022-08-22 13:20:21 +03:00
KevinZønda
a90135751b fix datagram support detection (#3511)
* fix: datagram support detection

- treat zero MaxDatagramFrameSize as unsupported.
- avoid send corresponding transport parameters when support is disabled
- report error when calling Send/ReceiveMessage and support is disabled

see https://github.com/lucas-clemente/quic-go/issues/3505

* patch: always initiate datagram

* fix: remove useless nil check
2022-08-22 03:02:40 -07:00
Marten Seemann
509616cbea Merge pull request #3514 from lucas-clemente/closed-session
use a single Go routine to send copies of CONNECTION_CLOSE packets
2022-08-22 12:07:39 +03:00
Marten Seemann
263f728ea8 add integration test for the retransmission of CONNECTION_CLOSE packets 2022-08-22 11:42:44 +03:00
Marten Seemann
b659414495 use a single Go routine to send copies of CONNECTION_CLOSE packets 2022-08-21 15:41:47 +03:00
Marten Seemann
c3ab9c4ea9 replace all connection IDs at the same time when connection is closed 2022-08-21 14:09:49 +03:00
Marten Seemann
635dc90475 use bits.OnesCount to determine if a number is a power of two
This should be 3-4x faster than the current implementation.
2022-08-21 13:09:57 +03:00
Marten Seemann
feb94286a5 move the 0-RTT queue to a separate file 2022-08-21 12:46:40 +03:00
Marten Seemann
19c6a1b252 use type assertions to identify 0-RTT queues in packet handler map 2022-08-21 12:44:40 +03:00
fanweixiao
57650fca7a add YoMo to list of projects in README (#3513) 2022-08-21 02:05:11 -07:00
mojatter
dd521c0573 http3: fix listening on both QUIC and TCP (#3465) 2022-08-20 08:56:28 -07:00
Benedikt Spies
7da024da5a Disable anti-amplification limit by address validation token (#3326) 2022-08-20 08:02:17 -07:00
Marten Seemann
8c0c481da1 fix typo in README 2022-08-14 01:38:58 -07:00
Marten Seemann
9957668d43 Merge pull request #3501 from lucas-clemente/new-address-validation-api
implement a new API to let servers control client address verification
2022-08-13 17:00:01 +02:00
Marten Seemann
bbfb7bd493 disable address validation by default
We should provide safe defaults. Since we implement the 3x amplification
limit, disabling address validation is not unsafe, and will save 1 RTT
for every handshake for applications that don't explicitely configure
Retries.
2022-08-13 17:42:46 +03:00
Marten Seemann
7fde609eef make sure RunHandshake has returned before closing, improve MITM tests 2022-08-13 17:42:45 +03:00
Marten Seemann
f2fa98c0dd implement a more intuitive address validation API 2022-08-12 13:13:29 +03:00
Marten Seemann
556a6e2f99 Merge pull request #3489 from lucas-clemente/generic-streams-map-incoming
use a generic streams map for incoming streams
2022-08-12 13:05:53 +04:00
Abirdcfly
dbb7a215a0 fix unreachable code after log.Fatal in fuzzing corpus generator (#3496)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-12 02:02:15 -07:00
Marten Seemann
b372d02ac4 remove genny dependency 2022-08-12 11:18:57 +03:00
Marten Seemann
bea5de0221 Merge pull request #3483 from lucas-clemente/generic-min-max
use generic Min and Max functions
2022-08-12 12:09:30 +04:00
Marten Seemann
5473b3ffd0 add QPACK (RFC 9204) to the list of supported RFCs (#3485) 2022-08-11 07:35:19 -07:00
Marten Seemann
80fd1b57c8 add a function to distinguish between long and short header packets (#3498) 2022-08-11 07:35:01 -07:00
Marten Seemann
621e9d4642 use a generic streams map for incoming streams 2022-08-11 18:31:45 +04:00
Marten Seemann
bebff462c8 use a generic streams map for outgoing streams (#3488) 2022-08-11 05:14:52 -07:00
Marten Seemann
b6e2608c15 update the Go 1.19 qtls to v0.1.0 (#3490) 2022-08-10 09:53:32 -07:00
Marten Seemann
498475fa60 update golangci-lint action to v3, golangci-lint to v1.48.0 (#3499)
* run gofmt -s -w

* stop using the deprecated io/ioutil package

* update golangci-lint action to v3, golangci-lint to v1.48.0
2022-08-10 09:50:48 -07:00
Marten Seemann
7ebe1430ef use a generic linked list (#3487) 2022-08-10 09:50:21 -07:00
Marten Seemann
43bde14cf7 implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
Marten Seemann
424325af58 rename utils.Min to utils.MinInt 2022-08-10 14:59:05 +02:00
Marten Seemann
2ea21b7b16 rename utils.Max to utils.MaxInt 2022-08-10 14:59:05 +02:00
Marten Seemann
ea9de26ed5 drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
Toby
d5efd340c7 optimize FirstOutstanding in the sent packet history (#3467)
* optimize FirstOutstanding

* fix variable naming

* bug fix

* minor code improvements

* add a test to make sure that `Iterate` iterates in the right order

* add comment
2022-07-24 12:50:41 -07:00
Marten Seemann
56a24f3e4c update supported RFCs in README (#3456) v0.28.1 2022-07-24 11:58:43 -07:00
Marten Seemann
61ca8e89fe http3: ignore context after response when using DontCloseRequestStream (#3473) 2022-07-24 11:58:12 -07:00
Marten Seemann
f29dd273b4 update for Go 1.19beta1 (#3460) v0.28.0 2022-06-28 01:12:44 -07:00
Matt Robenolt
98b25879e5 dedupe Alt-Svc header values (#3461) 2022-06-28 00:58:44 -07:00
Nuno Diegues
706a482340 only set DF for sockets that can handle it (#3448)
Fixes #3445
2022-06-19 10:38:34 -07:00
Marten Seemann
6fbc6d951a fix flaky HTTP/3 request body test (#3447) 2022-06-09 11:32:20 -07:00
Nuno Diegues
4c96cf75bf make the keep alive interval configurable (#3444)
* Make keep alive configurable

* Fix unit tests
2022-06-09 08:31:37 -07:00
Marten Seemann
619fa9fb44 Merge pull request #3432 from lucas-clemente/quicv2
implement QUIC v2
2022-06-09 15:52:40 +02:00