Commit Graph

44 Commits

Author SHA1 Message Date
Dirkjan Ochtman 6cb31438bb Hoist lint configuration to the workspace level 2026-01-12 16:46:28 +01:00
Floris Bruynooghe 143eb1b815 Merge branch 'main' into multipath-quinn-0.11.x 2025-08-02 17:14:02 +02:00
Dirkjan Ochtman 8339ef3ccc Upgrade rcgen to 0.14 2025-07-02 19:27:49 +00:00
Floris Bruynooghe deba4ee85f Merge branch 'main' into multipath-quinn-0.11.x 2025-04-10 12:36:01 +02:00
Dirkjan Ochtman a8807131e4 Switch to 2024 style 2025-02-23 11:52:46 +00:00
Diva M a935ad4df0 Merge commit '6ee883a2' into iroh-0.11.x 2025-01-14 23:05:01 -05:00
Dirkjan Ochtman 9a656d2d0b Enable use of aws-lc-rs instead of ring 2024-09-24 07:33:03 +00:00
Floris Bruynooghe f13a28921a Rename to iroh-quinn
This does the rename to iroh-quinn for the 0.11.2 release code.
2024-06-21 13:00:40 +02:00
Dirkjan Ochtman 3be1ab5ab2 Upgrade to rcgen 0.13 2024-04-22 09:45:53 +02:00
Dirkjan Ochtman a85a4c12ee Update rustls to 0.23 and ring to 0.17 2024-04-22 09:45:53 +02:00
Dirkjan Ochtman 07e428169b proto: deduplicate rustls ClientConfig setup 2024-04-22 09:45:53 +02:00
Dirkjan Ochtman e28b29f76e quinn: add bounds in dyn Error types 2024-04-22 09:45:53 +02:00
Benjamin Saunders 092a7686a4 Enable PMTUD by default when appropriate 2023-05-06 08:05:17 +02:00
Adolfo Ochagavía 2d48482180 Use PLPMTUD in bench, perf and examples
Sponsored by Stormshield
2023-04-04 17:40:20 -07:00
Benjamin Saunders 7d51d2e57e Remove Incoming stream in favor of Endpoint::accept 2022-10-23 08:18:42 +02:00
Benjamin Saunders b923c4c8b0 Pass SocketAddr by value
We always consume this by value in the end, and it's a little more
ergonomic.
2021-10-29 20:12:45 +02:00
Benjamin Saunders 5d1b6a101b Remove EndpointBuilder
Now that rustls configuration is more straightforward, this is not
adding significant value.
2021-10-29 20:12:45 +02:00
Benjamin Saunders 495d2927cb Remove certificate newtypes 2021-10-29 08:02:13 +02:00
Dirkjan Ochtman 9daaa15da2 Upgrade to rustls 0.20 2021-10-26 11:05:30 -07:00
Dirkjan Ochtman fed3c5cb39 Require explicit construction of ServerConfigs 2021-09-29 10:12:44 -07:00
Dirkjan Ochtman a7efd92044 Require explicit construction of ClientConfigs 2021-09-29 10:12:44 -07:00
Chris Connelly e63dd77376 Make TransportConfig setters infallible
For most setters this was just a case of changing the signature to take
a `VarInt`.

`max_idle_timeout` was a bit more involved in order to maintain a usable
conversion from `Duration`. The internal representation was changed from
`Duration` from `VarInt`, and an `IdleTimeout` newtype was introduced
for the setter signature. `IdleTimeout` contains a `VarInt`-encoded
millisecond value, and has a fallible conversion from `Duration`. The
use of a newtype is preferable to a direct `Duration` -> `VarInt`
encoding since there could be other `VarInt`-encoded values in future
that use a different resolution than milliseconds.

These changes allow callers to avoid the type-level possibility of error
if they have a `VarInt` (or a value that can be converted infallibly
into one). Fallible conversion from `VarInt` is still convenient with
`TryInto`, and callers can handle the conversion errors without the
indirection of `ConfigError`.

Closes #1176.

BREAKING CHANGE: The `max_concurrent_bidi_streams`,
`max_concurrent_uni_streams`, `stream_receive_window`, and
`receive_window` methods on `TransportConfig` now take `VarInt`
arguments and return `&mut Self`. `TransportConfig::max_idle_timeout`
now takes an `IdleTimeout` argument and returns `&mut Self`.
2021-09-19 18:30:43 -07:00
Dirkjan Ochtman d78b3187a9 Apply clippy suggestions from Rust 1.54 2021-07-30 13:29:32 -07:00
Benjamin Saunders 1e5a538221 Limit concurrent streams rather than accept queue size
Previously, we limited the number of streams that could be opened by
the peer but not `accept`ed by the application. However, to guarantee
bounded resource use, applications will typically want to limit the
number of streams they process concurrently. While this could
be *approximately* implemented at the application layer by controlling
calls to accept, that approach has a significant drawback: If streams
are slow to process, the worst-case per-stream latency observed by a
peer who opens the maximum number of streams can be arbitrarily bad,
because streams may be opened above the limit the local application is
willing to process. Reducing the number of unaccepted streams
tolerated can reduce the proportion of streams affected, but reducing
it too low will increase the number of round trips required to open
any given number of streams, increasing average latency significantly.

As a side benefit, this reduces the effort needed for applications to
limit concurrency to a fixed quantity, which is expected to be the
overwhelmingly common case. Should a use case for dynamic concurrency
limits arise, we can expose a setter.
2021-01-22 11:39:00 -08:00
Dirkjan Ochtman 17fe82b598 Apply clippy fixes for 1.49 2021-01-01 11:16:05 -08:00
Luca Barbato fc2016103d Fix a typo 2020-12-04 10:30:40 +01:00
Dirkjan Ochtman d5b47f601d Unwrap unused results from invalid config values 2020-10-12 12:13:50 -07:00
Benjamin Saunders a1e8c56cb0 Update initial salt, retry integrity key/nonce, and versions 2020-06-30 08:57:14 +02:00
Benjamin Saunders ca689d33d6 Update version numbers for draft 28 2020-05-25 06:22:35 +02:00
Benjamin Saunders cbb3470c7e Update draft number 2020-03-08 12:04:26 -07:00
Dirkjan Ochtman 6cca808d14 Make rustls an optional dependency for quinn 2020-03-07 12:12:01 -08:00
Benjamin Saunders 5774071b48 Spawn driver tasks implicitly 2020-01-13 09:54:26 +01:00
Benjamin Saunders 16e670c9f3 Simplify example common module 2020-01-13 08:54:04 +01:00
Benjamin Saunders 09729ebd23 Opaque config structs
Only exposing setters improves forwards compatibility and error
checking.
2020-01-13 08:53:05 +01:00
Benjamin Saunders 8d3a5958f4 Update version to draft 24 2019-11-25 15:08:39 +01:00
Timon Post ac810125c1 merge imports 2019-11-19 08:23:35 +01:00
Benjamin Saunders 8e1c6b605e Remove ToSocketAddrs from EndpointBuilder::bind
Improves consistency with Endpoint::connect and removes the
possibility of silent blocking should the user pass in a domain
name. The generic API was originally motivated by the convenience of
passing in numeric addresses as strings, but `.parse().unwrap()` is
pretty easy too.
2019-09-29 07:21:06 +02:00
Dirkjan Ochtman 2afe7f597d Update initial salt and QUIC version to draft 23 2019-09-23 12:25:08 -07:00
Benjamin Saunders e7929713cd Handle unclear interop ALPN 2019-07-11 20:52:19 +02:00
Benjamin Saunders d187f99c25 Fix warnings in high-level examples 2019-06-24 19:31:38 +02:00
Dirkjan Ochtman 7b507d82b1 Move ALPN_QUIC_HTTP from library to examples/interop code 2019-06-20 12:30:02 -07:00
Dirkjan Ochtman 45ee97bd5a Upgrade to rcgen 0.4 2019-06-18 14:11:40 -07:00
Benjamin Saunders 462267f281 Fix example endpoint construction 2019-04-18 06:53:20 +02:00
Povilas Balciunas 53e677dac6 Add the simplest QUIC connection example 2019-04-17 17:54:25 +02:00