254 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
Marten Seemann
f607ef489f protocol: optimize ConnectionID.String (#5351)
This function is used by qlog, so it should be fast.
2025-10-03 14:27:39 +08:00
Marten Seemann
da27fcf33f expose basic connection stats via Conn.ConnectionStats (#5281)
* Add ConnectionStats

* remove for loop

* Add comments

* Update comments

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
2025-08-13 16:45:14 +02:00
Marten Seemann
aa22706d78 ci: enable the nolintlint linter (#5221)
This linter helps us find unneeded nolint statements.
2025-06-11 06:52:21 +02:00
Marten Seemann
576aa1747f simplify stream ID handling in the incoming streams map (#5207)
* simplify stream ID handling in the incoming streams map

No functional change expected.

* protocol: move stream ID constant definition
2025-06-08 12:25:36 +02:00
Marten Seemann
8474eddd3a use the slices package to simply QUIC version comparisons (#5130)
No functional change expected.
2025-05-09 06:24:45 +02:00
Marten Seemann
9b3ff059fc delete closed connections after 3 PTOs (#5117)
In most cases, this should be earlier than the current
timeout value of 5s.
2025-05-04 12:51:39 +02:00
Marten Seemann
7548cc069a protocol: fix flaky TestVersionGreasing (#5051) 2025-04-19 10:19:00 +02:00
Marten Seemann
0894931c64 protocol: use math/rand/v2 to generate greased versions (#5046) 2025-04-14 14:30:04 +02:00
Marten Seemann
ef2b87f5d5 detect stateless resets for zero-length connection IDs (#5027) 2025-04-11 15:23:53 +02:00
Marten Seemann
bf28da8346 handshake: use new crypto/tls 0-RTT API (#4953)
* handshake: simplify method signature of cryptoSetup.handleEvent

* use the new crypto/tls 0-RTT API
2025-02-14 03:17:01 +01:00
Marten Seemann
a32d31288e remove hardcoded maximum keep-alive period (#4827)
The keep-alive period can be set using Config.KeepAlivePeriod. While
very large values will likely make keep-alives ineffective (depending on
the NATs in the path), there's no good reason to hardcode a maximum
value.
2024-12-31 11:26:40 +08:00
Marten Seemann
196c4bb16b protocol: move away from Ginkgo (#4650) 2024-09-11 21:39:03 -07:00
Marten Seemann
4be70e0146 protocol: use the packet number decoding / encoding logic from the RFC (#4661) 2024-09-05 09:54:44 -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
bt90
75662469a1 increase send and receive buffer size to 7 MiB (#4455)
This increases throughput on high-bandwidth connections.
7 MB is the value that WireGuard uses, see
f26efb65f2
for details.
2024-04-23 13:28:14 -07:00
Marten Seemann
2fbe713bb6 protocol: don't capitalize Perspective.String (#4296) 2024-02-01 15:16:36 -08:00
Marten Seemann
0582e931a5 wire: optimize generation of Version Negotiation packets (#4278)
* wire: optimize generation of Version Negotiation packets

* protocol: optimize adding greased version numbers
2024-01-31 23:54:04 -08:00
Marten Seemann
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
1fce81f8bb queue up to 32 DATAGRAM frames to send (#4222) 2023-12-31 19:58:41 -08:00
chungthuang
7b9d21fbe6 send large max_datagram_frame size, introduce a DatagramTooLargeError error (#4143)
The size can be overwritten to a lower value for testing.
2023-12-02 06:27:15 -08:00
Marten Seemann
b73a4de7ea only add an ECN control message if ECN is supported 2023-09-11 20:31:50 +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
e1fcac3e46 set the handshake timeout to twice the handshake idle timeout (#4063) 2023-09-09 06:12:37 -07:00
Marten Seemann
443c6148b6 protocol: add string representation for ECN values (#4008) 2023-08-18 17:17:37 -07:00
Marten Seemann
21388c86bb drop support for draft-29 (#3903) 2023-06-21 04:06:44 -07:00
Marten Seemann
7d8db149b6 introduce a buffer pool for large buffers (20k) 2023-06-02 18:35:02 +03:00
Marten Seemann
fce0261c34 wire: apply the default value for the active_connection_id_limit (#3806) 2023-05-28 11:45:46 -07:00
Marten Seemann
74be4d2755 add a function to set the UDP send buffer size
This function is the equivalent to the function used to set the UDP
receive buffer size. It's so similar that code generation is used to
make a copy of the setReceiveBuffer function.
2023-05-08 14:35:21 +03: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
f36690ae9c protocol: remove VersionWhatever, previously used for testing (#3763) 2023-04-19 06:19:27 -07:00
Marten Seemann
7fbcbf7ac6 update QUIC v2 support to draft-ietf-quic-v2-08 (#3631) 2023-01-04 07:07:06 +13:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
d03f9c2a4f reduce max DATAGRAM frame size, so that DATAGRAMs fit in IPv6 packets (#3581) 2022-10-11 02:26:10 -07: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
bad60f3c27 add the version number for QUIC v2 2022-05-25 15:50:04 +02:00
Marten Seemann
d5961e9d60 update docs to reflect that we support RFC 9221 (Unreliable Datagrams) (#3382) 2022-04-25 04:10:51 -07:00
Marten Seemann
4b17343631 rename the session to connection 2022-03-27 12:50:14 +01:00
Marten Seemann
e71c236232 rename the Session to Connection 2022-03-27 11:27:23 +01:00
Marten Seemann
f51cc93770 drop support for QUIC draft version 32 and 34 2021-07-06 09:50:10 -07:00
Marten Seemann
876bc493cd Merge pull request #3213 from lucas-clemente/remove-retire-bug-compat-mode
remove the RetireBugBackwardsCompatibilityMode
2021-07-06 09:47:18 -07:00
Marten Seemann
9520f242e9 remove unused StripGreasedVersions function
Such a function would defeat the purpose of greasing. Fortunately, we didn't
actually use it anywhere.
2021-06-27 15:00:28 -07:00
Marten Seemann
b2857b5442 remove the RetireBugBackwardsCompatibilityMode 2021-06-26 15:49:02 -07:00
Marten Seemann
68da2c4468 add support for QUIC v1, RFC 9000 2021-05-29 11:56:14 -07:00
Marten Seemann
6b771df453 add support for QUIC v1 2021-05-01 10:05:29 +07:00
Marten Seemann
f5238bf7b1 move the ApplicationErrorCdoe to the qerr package 2021-05-01 09:38:49 +07:00