Commit Graph

62 Commits

Author SHA1 Message Date
Lars Eggert f8b8c5032e chore: Fix cargo clippy issues 2024-11-18 23:31:18 +00:00
Benjamin Saunders b42e21e74d Make SendStream::finish synchronous
`await`ing on this was error-prone and not very useful, since it gave
little insight into application state, and was redundant to `stopped`.
2024-05-03 11:52:44 -07:00
gabrik ce13559778 proto: validate ServerConfig crypto provider
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
2024-04-22 09:45:53 +02:00
Dirkjan Ochtman e6d48970af proto: validate ClientConfig crypto provider
Co-authored-by: gabrik <gabriele.baldoni@gmail.com>
2024-04-22 09:45:53 +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 f0d1a45639 perf: hoist config construction out of conditionals 2024-04-22 09:45:53 +02:00
Dirkjan Ochtman 85351bc399 proto: remove the Side argument from ServerConfig::initial_keys() 2024-04-22 09:45:53 +02:00
Damien Deville 90118e76b3 perf: change throughput units from MiB/s into Mb/s. 2024-04-18 19:26:36 +02:00
Phoenix Kahlo 54d5d60b42 Allow accept/refuse/retry before handshake begins
This commit removes use_retry from the server config and provides a
public API for the user to manually accept/refuse/retry incoming
connections before a handshake begins, and inspect properties such as
an incoming connection's remote address and whether that address is
validated when doing so.

In quinn-proto, Incoming is made public, as well as Endpoint's accept/
refuse/retry methods which operate on it. The
DatagramEvent::NewConnection event is modified to return an incoming
but not yet accepted connection.

In quinn, awaiting Endpoint::accept now yields a new
quinn::Incoming type, rather than quinn::Connecting. The new
quinn::Incoming type has all the methods its quinn_proto equivalent has,
as well as an accept method to (fallibly) transition it into a
Connecting, and also refuse, retry, and ignore methods.

Furthermore, quinn::Incoming implements IntoFuture with the output type
Result<Connection, ConnectionError>>, which is the same as the Future
output type of Connecting. This lets server code which was
straightforwardly awaiting the result of quinn::Endpoint::accept work
with little to no modification.

The test accept_after_close was removed because the functionality it
was testing for no longer exists.
2024-04-03 10:02:29 +02:00
Benjamin Saunders 044eab53ff Update clap 2023-05-11 14:10:19 +02:00
Benjamin Saunders 092a7686a4 Enable PMTUD by default when appropriate 2023-05-06 08:05:17 +02:00
Adolfo Ochagavía 030a0e8d72 Use mtu instead of max_udp_payload_size in names
Sponsored by Stormshield
2023-05-03 09:29:12 +02:00
Adolfo Ochagavía 74d3689962 Fix no-protection option in perf crate
Sponsored by Stormshield
2023-04-26 13:18:42 -07:00
Dirkjan Ochtman 3eb26361db quinn: take Arc<dyn Runtime> directly 2023-04-14 16:08:01 -07:00
Adolfo Ochagavía 2d48482180 Use PLPMTUD in bench, perf and examples
Sponsored by Stormshield
2023-04-04 17:40:20 -07:00
Dirkjan Ochtman 3cc7efbe55 Apply remaining clippy suggestions from clippy 1.67 2023-02-27 07:34:35 +01:00
Damien Deville 390f2ebeba Add a special crypto session to perf binaries to disable packet
encryption / decryption. It can be enabled using --no-protection
command line option. This can be use when doing performance
tests to reveal other hotspots than packet encryption and
decryption.
2023-01-26 22:47:53 -08:00
Dezhi Wu 6e1442370b Fix usage message 2023-01-26 22:38:52 -08:00
Dirkjan Ochtman 2c6aa43610 Apply clippy suggestions from Rust 1.66 2022-12-19 10:13:01 -08:00
Damien Deville b80baa008d Add --initial-max-udp-payload-size command line option for perf
client and server binaries to change the initial size of UDP
packet payload.
2022-10-28 09:24:03 +02:00
Damien Deville cebfb270f6 Add --keylog command line option for perf client and server
binaries. This allow dumping crypto keys to disk using
SSLKEYLOGFILE env var.
2022-10-27 17:49:28 -07:00
Benjamin Saunders 7d51d2e57e Remove Incoming stream in favor of Endpoint::accept 2022-10-23 08:18:42 +02:00
Benjamin Saunders 6e4bcbb2fc Drop NewConnection in favor of simpler API 2022-09-27 11:08:26 +02:00
Benjamin Saunders ffa85f2c43 Abstract out async runtime
Co-authored-by: Yureka <yuka@yuka.dev>
2022-07-05 09:06:31 -07:00
Benjamin Saunders fe93a68108 Replace structopt with its successor, clap 3 2022-07-03 21:02:33 +02:00
Benjamin Saunders c1bd43f3a6 Satisfy clippy 2022-04-08 17:51:22 +02:00
Benjamin Saunders 7ed94be3e4 Provide inherent next methods on streams
Allows for convenient use in async blocks by downstream code without a
futures_util dependency.
2021-12-21 07:03:27 +01:00
Dirkjan Ochtman ee6bbf1d2a Fix clippy suggestions from 1.57 2021-12-10 10:29:12 -08:00
Benjamin Saunders 1159ae3c65 Non-exhaustive ClientConfig 2021-11-10 11:25:19 +01: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
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
Wesley Rosenblum 2d30749e97 Make json output an optional feature 2021-08-19 15:23:31 +02:00
Wesley Rosenblum 48b094cca8 Add json module to output results in json format 2021-08-19 15:23:31 +02:00
Wesley Rosenblum 566d10f914 Add OpenStreamStats to track statistics per stream 2021-08-19 15:23:31 +02:00
Wesley Rosenblum 6997d2d2a9 Move stats types into a separate module 2021-08-19 15:23:31 +02:00
Marcel Märtens b224d1d0fa switch to futures_utils in tests and benches, also use futures_utils isntead of futures_core 2021-08-11 10:27:32 +02:00
Dirkjan Ochtman d78b3187a9 Apply clippy suggestions from Rust 1.54 2021-07-30 13:29:32 -07:00
Matthias Einwag e3060d3ff2 Print connection statistics in perf client and server
This adds the `--conn-stats` flag to both CLI tools, which will print
the connection statistics together with other data every 2s.
2021-05-28 09:05:53 +02:00
Luca Barbato 5ab895ba19 Add a mean to set the local address in the perf_client 2021-05-24 13:20:38 +02:00
Luca Barbato bd2a795dd9 Bind to the right ip family the local socket 2021-05-20 11:14:13 -07:00
Thomas de Zeeuw 49475c22b2 Update to socket2 v0.4 2021-03-21 14:39:11 +01:00
Matthias Einwag ff79550cd8 Print perf_client RPS in floating point format
For large requests and high latency connections the number
showed 0 most of the time which isn't too helpful.
2021-03-18 13:43:21 -07:00
Matthias Einwag 2870519f6e perf: Use dual stack socket for endpoints
Users found it rather confusing that binding to the default address
(::0) doesn't allow incoming connections via IPv4 on windows.
This change will allow for this, by using a IPv6 socket and
disabling IPv6-only on all platforms. This lets the windows and unix
implementations behave equally.
2021-03-08 06:38:34 +01:00
Matthias Einwag fe03f7d2de Rename perf server and client
The executable names conflicted with the interop server:

> The bin target `server` in package `perf v0.1.0 (C:\Users\matth\Code\rust\quinn\perf)` has the same output filename as the bin target `server` in package `interop v0.1.0 (C:\Users\matth\Code\rust\quinn\interop)`.
> Colliding filename is: C:\Users\matth\Code\rust\quinn\target\debug\server.pdb
> The targets should have unique names.
2021-03-08 06:38:34 +01:00
Dirkjan Ochtman 0f285bd751 perf: tweak style in bind_socket() 2021-03-04 12:36:49 -08:00
Dirkjan Ochtman 85dde101bd perf: adopt more convential crate layout 2021-03-04 12:36:49 -08:00