Commit graph

16 commits

Author SHA1 Message Date
Gaukas Wang
ea40752ca3
new: uquic 2023-08-02 15:38:16 -06:00
Gaukas Wang
251b3afe6e
impl: QUIC Header mimicry 2023-07-29 13:17:27 -06: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
53412e9ba3 trace arbitrary length Connection IDs for Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
21b9ef03be add a type for arbitrary length Connection IDs, and parsing function
RFC 8999 allows Connection IDs of up to 255 bytes. Current QUIC versions
only use up to 20 bytes.
2022-08-29 10:58:33 +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
6ece64d8a5 log connection IDs without the 0x prefix 2021-02-11 09:45:40 +08:00
Marten Seemann
d226f70cd7 allow up to 20 byte for the initial connection IDs 2020-12-14 11:32:43 +07:00
Marten Seemann
872e1747f4 always use connection IDs longer than 8 bytes when sending a Retry
A server is allowed to perform multiple Retries. There's little to gain
from doing so, but it's something our API allows. If a server performs
multiple Retries, it must use a connection ID that's at least 8 bytes
long. Only if it doesn't perform any further Retries it is allowed to
use shorter IDs. Therefore, we're on the safe side by always using a
long connection ID.
This shouldn't have a performance impact, since the server changes the
connection ID to a short value with the first Handshake packet it sends.
2018-08-14 17:34:21 +07:00
Marten Seemann
73f7636537 use a random length destination connection ID on the Initial packet
The destination connection ID on the Initial packet must be at least 8
bytes long. By using all valid values, we make sure that the everything
works correctly. The server chooses a new connection ID with the Retry
or Handshake packet it sends, so the overhead of this is negligible.
2018-07-03 18:01:41 +07:00
Marten Seemann
0bd7e744ff implement parsing of headers with different connection ID lengths 2018-07-03 18:01:41 +07:00
Marten Seemann
fae32101a0 use different source and destination connection IDs 2018-04-23 15:23:01 +09:00
Marten Seemann
d47124d14d add more methods to the protocol.ConnectionID
This will make it easier to change the underlying type of the connection
ID (potentially an array is faster than a byte slice).
2018-04-19 16:08:06 +09:00
Marten Seemann
1a035a265c change the type of Connection ID to byte slice 2018-04-18 22:41:24 +09:00
Marten Seemann
af8971d8c9 move connection ID generation from the utils to the protocol package 2018-04-17 20:21:06 +09:00
Renamed from internal/utils/connection_id.go (Browse further)