Commit graph

299 commits

Author SHA1 Message Date
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
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
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
fbaa941ea1
protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
9b83ac230b
fix flaky handshake limiting test (#4281) 2024-01-28 20:26:03 -08:00
Marten Seemann
c82c37a31c
fix flaky accept queue test (#4280) 2024-01-28 20:14:02 -08:00
Marten Seemann
d3974e1674
fix flaky handshake limiting test (#4270) 2024-01-25 00:53:20 -08:00
Marten Seemann
a2cf43d75c
remove the RequireAddressValidation callback from the Config (#4253) 2024-01-22 21:24:07 -08:00
Marten Seemann
892851eb8c
add Transport config options to limit the number of handshakes (#4248)
* add Transport config options to limit the number of handshakes

* fix accounting for failed handshakes

* increase handshake limits, improve documentation
2024-01-22 21:04:25 -08:00
Marten Seemann
594440b04c
don't remove closed connections from the server's accept queue (#4245) 2024-01-18 22:45:38 -08:00
Marten Seemann
cb1775a08a
send out the CONNECTION_REFUSED error when refusing a connection (#4250)
So far, we used Connection.destroy, which destroys a connection without
sending out a CONNECTION_CLOSE frame. This is useful (for example) when
receiving a stateless reset, but it's not what we want when the server
refuses an incoming connection. In this case, we want to send out a
packet with a CONNECTION_CLOSE frame to inform the client that the
connection attempt is being rejected.
2024-01-18 22:29:22 -08:00
Marten Seemann
427f53328b
fix flaky server test (#4167) 2023-11-14 02:00:42 -08:00
Marten Seemann
dda63b90eb
don't close established connections on Listener.Close, when using a Transport (#4072)
* don't close established connections on Listener.Close

* only close once
2023-10-26 23:10:13 -07:00
Marten Seemann
a263164d9f
use new gomock feature to generate type-safe methods in mocks (#4057) 2023-10-20 22:55:33 -07:00
Marten Seemann
9a397abc17
update gomock to v0.3.0 (#4087) 2023-09-24 04:38:28 -07:00
Marten Seemann
1affe38703
move MaxTokenAge configuration option to the Transport (#4084) 2023-09-16 05:10:20 -07:00
Marten Seemann
9b82196578
make the logging.Tracer and logging.ConnectionTracer a struct (#4082) 2023-09-16 04:58:51 -07:00
Marten Seemann
abfe1ef548
remove Config.MaxRetryTokenAge, set it to the handshake timeout (#4064)
There is no good reason to manually set the validity period for Retry
tokens. Retry tokens are only valid on a single connection during the
handshake, so it makes sense to limit their validity to the configured
handshake timeout.
2023-09-10 13:53:12 +07:00
Marten Seemann
d7334c16e7
move the DisableVersionNegotiationPackets flag to the Transport (#4047)
* move the DisableVersionNegotiationPackets flag to the Transport

* add an integration test for DisableVersionNegotiationPackets
2023-08-30 23:33:40 -07:00
Marten Seemann
2797f85fc0
switch from unmaintained golang/mock to go.uber.org/mock (#4050) 2023-08-28 02:23:55 -07:00
Marten Seemann
072a602cc1
pass around receivedPacket as struct instead of as pointer (#3823) 2023-06-03 00:08:58 -07:00
Marten Seemann
07ad2cbee2 remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
Marten Seemann
bc7cb706c5 add a GetConfigForClient callback to the Config 2023-05-02 15:56:49 +02:00
Marten Seemann
ba942715db remove ConnectionIDLength and ConnectionIDGenerator from the Config 2023-05-02 15:56:49 +02:00
Marten Seemann
b79b532b04 remove StatelessResetKey from the Config, it's now on the Transport 2023-05-02 15:56:49 +02:00
Marten Seemann
8189e75be6 implement the Transport 2023-05-02 15:56:48 +02:00
Marten Seemann
ae5a8bd35c move the QUIC version check to the config validation 2023-05-02 09:44:58 +02:00
Marten Seemann
86a1234c87 make EarlyListener a struct, not an interface 2023-05-01 14:41:16 +02:00
Marten Seemann
1b64b13750 make Listener a struct, not an interface 2023-05-01 14:41:16 +02:00
Marten Seemann
6617f3d39a don't use timers to clean up 0-RTT queues 2023-05-01 14:24:28 +02:00
Marten Seemann
58487803d3 move 0-RTT queue handling from the packet handler map to the server 2023-05-01 14:24:28 +02:00
Marten Seemann
c9a2f79b1c
simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
Marten Seemann
1f57d4e789
protocol: remove VersionTLS, used during the gQUIC -> TLS 1.3 transition (#3764) 2023-04-19 07:24:34 -07:00
Marten Seemann
a4b0265628
use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
ef28f4667f refactor frame parser to remove version parameter from constructor 2023-01-18 20:51:58 +13:00
Marten Seemann
c24fbb094c
refactor header writing to append to a byte slice (#3646)
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +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
8d496ebb5e
introduce a type for the stateless reset key (#3621) 2022-11-16 14:11:25 -08:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
dfd35cb071
use a single bytes.Reader for frame parsing (#3536) 2022-09-01 01:06:50 -07:00
Marten Seemann
4f3d3b36ac introduce a separate code path for unpacking short header packets 2022-08-29 15:55:37 +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
Benedikt Spies
7da024da5a
Disable anti-amplification limit by address validation token (#3326) 2022-08-20 08:02:17 -07: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
f2fa98c0dd implement a more intuitive address validation API 2022-08-12 13:13:29 +03: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