Commit Graph

284 Commits

Author SHA1 Message Date
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +13:00
Marten Seemann
aca052dc7c stop using the ExtendedHeader for parsing short header packets in tests 2023-01-17 21:53:39 +13:00
Marten Seemann
e89fc1152b stop using the ExtendedHeader for writing short header packets in tests 2023-01-17 21:53:39 +13:00
Marten Seemann
24be84cd00 introduce separate tracing calls for sent long and short header packets 2023-01-17 21:53:37 +13:00
Marten Seemann
a2e52e31a8 fix flaky counting of 0-RTT packets in integration test (#3669) 2023-01-16 23:34:45 +13:00
Marten Seemann
b52d34008f add Allow0RTT opt in the quic.Config to control 0-RTT on the server side (#3635) 2023-01-04 16:18:11 -08:00
Marten Seemann
07918469bc use ed25519 instead of RSA keys in integration tests (#3661) 2023-01-04 07:06:34 +13:00
Marten Seemann
8d496ebb5e introduce a type for the stateless reset key (#3621) 2022-11-16 14:11:25 -08:00
Marten Seemann
423f5dcf6c Merge pull request #3589 from lucas-clemente/update-ginkgo-v2
migrate to Ginkgo v2, remove benchmark test
2022-10-11 22:03:09 +03:00
Marten Seemann
192ae3437b don't drop more than 10 consecutive packets in drop test (#3584) 2022-10-11 05:44:07 -07:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
2b5d1281c1 http3: add http3.Server.ServeQUICConn to serve a single QUIC connection (#3587) 2022-10-11 05:07:24 -07:00
Marten Seemann
ed15a94703 split the tracing function for received short and long header packets 2022-08-29 15:32:27 +03:00
Marten Seemann
4cbb4f8114 remove ConnectionID.Equal function
Connection IDs can now be compared with ==.
2022-08-29 11:30:32 +03:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
Marten Seemann
9e0f9e62ff parse arbitrary length Connection IDs in Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
53412e9ba3 trace arbitrary length Connection IDs for Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
880dfc699c use the null tracers in the tracer integration tests (#3528) 2022-08-29 10:27:04 +03:00
Marten Seemann
07412be8a0 Merge pull request #3512 from lucas-clemente/null-connection-tracer
add a logging.NullTracer and logging.NullConnectionTracer
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
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
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
263f728ea8 add integration test for the retransmission of CONNECTION_CLOSE packets 2022-08-22 11:42:44 +03: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
80fd1b57c8 add a function to distinguish between long and short header packets (#3498) 2022-08-11 07:35:01 -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
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
3eed9d1104 don't close the stream if it was hijacked 2022-06-09 10:51:23 +02:00
Marten Seemann
6fa7494c2f add a http3.HTTPStreamer, allowing users to take over the HTTP/3 stream 2022-06-09 10:51:23 +02:00
Marten Seemann
53be3ee500 don't send CONNECTION_CLOSE if error occurred before sending anything 2022-05-20 12:27:00 +02:00
Ivan Trubach
0ec8ee3cff do not embed http.Server in http3.Server (#3397)
This change removes the embedded http.Server struct from http3.Server.
It slightly changes some error behavior, in particular, it mandates
TLSConfig for methods that create QUIC listeners.

Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes
options were used from the http.Server. These are now defined directly
in http3.Server with an improved documentation.
2022-05-20 02:53:23 -07:00
Chao Fei
60bbe92194 remove error return value from ComposeVersionNegotiation (#3410) 2022-05-12 08:03:39 -07:00
Marten Seemann
a6a9b2494b reduce flakiness of deadline integration tests (#3383) 2022-04-25 04:00:33 -07:00
Marten Seemann
6aaa9a817c rename the EarlySession to EarlyConnection 2022-03-27 11:27:25 +01:00
Marten Seemann
fda9f72161 replace usages of session in variable names 2022-03-27 11:27:25 +01:00
Marten Seemann
e71c236232 rename the Session to Connection 2022-03-27 11:27:23 +01:00
Artem Mikheev
b7e93b54c9 Implement http3.Server.ServeListener (#3349)
* feat(http3): implement serving from quic.Listener

ServeListener method added to http3.Server allowing serving from an existing listener
ConfigureTLSConfig function added to http3 which should be used to create listeners meant for serving http3.

* docs(http3): add note about using ConfigureTLSConfig to ServeListener

* fix(http3): stop serving non-created listeners after Server.Close

* refactor(http3): return ErrServerClosed once server closes instead of context.Canceled

* feat(http3): close listeners from ServeListener as well

* fix(http3): fix logger not being setup during ServeListener

* test(http3): add unit tests for serving listeners

* test(http3): add tests for ConfigureTLSConfig

* test(http3): added server hotswapping integration test

* fix: race condition in listener tests
2022-03-21 02:20:29 -07:00
Marten Seemann
2c8b939d4c add an integration tests that cancels streams frequently 2021-10-16 19:24:28 +02:00
Marten Seemann
8ecbb05d44 Merge pull request #3247 from lucas-clemente/drop-go-115
drop support for Go 1.15
2021-08-05 19:50:30 +02:00
Marten Seemann
be68f7fd65 Merge pull request #3241 from lucas-clemente/fix-stream-cancel-read-race
fix race when stream.Read and CancelRead are called concurrently
2021-08-05 16:20:32 +02:00
Marten Seemann
68e468a3bc drop support for Go 1.15 2021-08-05 14:18:56 +02:00
Marten Seemann
19cebde7c7 also count coalesced 0-RTT packets in the integration tests 2021-08-05 12:54:43 +02:00
Marten Seemann
fbc30cd942 fix race when stream.Read and CancelRead are called concurrently 2021-07-29 13:41:40 +02:00
Marten Seemann
9794b6da4c fix flaky 0-RTT integration test 2021-07-06 11:29:47 -07:00
Marten Seemann
dbb517858e fix incorrect usage of errors.Is
errors.Is is supposed to used for equality of errors, not for type
assertions. That's what errors.As is there for.
2021-06-28 15:29:52 -07:00
Marten Seemann
d97f03bc04 Merge pull request #3166 from lucas-clemente/close-reason-logging
use the new error types to log the reason why a connection is closed
2021-05-04 18:34:34 +07:00
Marten Seemann
1613809ba2 use the new error types to log the reason why a connection is closed 2021-05-03 14:00:41 +07:00
Marten Seemann
e8b09bc290 fix race condition in deadline integration test 2021-05-03 13:24:06 +07:00