70 Commits

Author SHA1 Message Date
Alessandro Ghedini
d707c50e6b apps: more workspace dependencies
The nix version on the workspace is actually lower, so I downgraded the
version used by apps too.

Only other incompatible thing was url, but that just require a slight
change in how addresses are resolved.
2025-02-21 12:09:49 +00:00
renshuncui
9d3c68ed24 chore: fix some typos
Signed-off-by: renshuncui <renshun@111.com>
2025-02-19 14:49:57 +00:00
Alessandro Ghedini
7c66757dbc Cargo: move some more deps to workspace and reformat
Some checks failed
Deploy / docs (push) Has been cancelled
Deploy / docker (push) Has been cancelled
Semgrep config / semgrep/ci (push) Has been cancelled
Stable / quiche () (push) Has been cancelled
Stable / quiche (boringssl-boring-crate) (push) Has been cancelled
Stable / quiche (openssl) (push) Has been cancelled
Stable / quiche_macos (macos-13) (push) Has been cancelled
Stable / quiche_macos (macos-latest) (push) Has been cancelled
Stable / http3_test (push) Has been cancelled
Stable / docker (push) Has been cancelled
Stable / android_ndk_lts (arm64-v8a, aarch64-linux-android) (push) Has been cancelled
Stable / android_ndk_lts (armeabi-v7a, armv7-linux-androideabi) (push) Has been cancelled
Stable / android_ndk_lts (x86, i686-linux-android) (push) Has been cancelled
Stable / android_ndk_lts (x86_64, x86_64-linux-android) (push) Has been cancelled
Nightly / quiche (push) Has been cancelled
Nightly / fuzz (push) Has been cancelled
Nightly / http3_test (push) Has been cancelled
Stable / quiche_ios (aarch64-apple-ios) (push) Has been cancelled
Stable / quiche_ios (x86_64-apple-ios) (push) Has been cancelled
Stable / quiche_windows (i686-pc-windows-gnu) (push) Has been cancelled
Stable / quiche_windows (i686-pc-windows-msvc) (push) Has been cancelled
Stable / quiche_windows (x86_64-pc-windows-gnu) (push) Has been cancelled
Stable / quiche_windows (x86_64-pc-windows-msvc) (push) Has been cancelled
Stable / quiche_multiarch (aarch64-unknown-linux-gnu) (push) Has been cancelled
Stable / quiche_multiarch (armv7-unknown-linux-gnueabihf) (push) Has been cancelled
Stable / quiche_multiarch (i686-unknown-linux-gnu) (push) Has been cancelled
2025-02-12 11:00:56 +00:00
Alessandro Ghedini
ad18afa756 Cargo: unify some metadata across workspace 2025-02-11 14:07:39 +00:00
Alessandro Ghedini
17856708ad qns: increase active CIDs limit for interop
Some checks are pending
Deploy / docs (push) Waiting to run
Deploy / docker (push) Waiting to run
Nightly / quiche (push) Waiting to run
Nightly / fuzz (push) Waiting to run
Nightly / http3_test (push) Waiting to run
Semgrep config / semgrep/ci (push) Waiting to run
Stable / quiche (boringssl-boring-crate) (push) Waiting to run
Stable / quiche (openssl) (push) Waiting to run
Stable / quiche_macos (macos-13) (push) Waiting to run
Stable / quiche_macos (macos-latest) (push) Waiting to run
Stable / quiche_ios (aarch64-apple-ios) (push) Waiting to run
Stable / quiche () (push) Waiting to run
Stable / quiche_ios (x86_64-apple-ios) (push) Waiting to run
Stable / quiche_windows (i686-pc-windows-gnu) (push) Waiting to run
Stable / quiche_windows (i686-pc-windows-msvc) (push) Waiting to run
Stable / quiche_windows (x86_64-pc-windows-gnu) (push) Waiting to run
Stable / quiche_windows (x86_64-pc-windows-msvc) (push) Waiting to run
Stable / quiche_multiarch (aarch64-unknown-linux-gnu) (push) Waiting to run
Stable / quiche_multiarch (armv7-unknown-linux-gnueabihf) (push) Waiting to run
Stable / quiche_multiarch (i686-unknown-linux-gnu) (push) Waiting to run
Stable / http3_test (push) Waiting to run
Stable / docker (push) Waiting to run
Stable / android_ndk_lts (arm64-v8a, aarch64-linux-android) (push) Waiting to run
Stable / android_ndk_lts (armeabi-v7a, armv7-linux-androideabi) (push) Waiting to run
Stable / android_ndk_lts (x86, i686-linux-android) (push) Waiting to run
Stable / android_ndk_lts (x86_64, x86_64-linux-android) (push) Waiting to run
Currently the max active CIDs limit controls both the number of active
CIDs as well as the number of active paths, so while during rebinding
tests the CIDs don't change, we are still prevented from creating new
paths because of the limit, causing the interop rebinding tests to fail.
2025-01-28 14:35:21 +00:00
Alessandro Ghedini
2c9a1923c5 apps: log both source and destination addresses
This can be useful to debug address rebinding problems.
2025-01-27 13:28:42 +00:00
Evan Rittenhouse
3541aa1efc chore: fix clippy errors
Some checks are pending
Deploy / docs (push) Waiting to run
Deploy / docker (push) Waiting to run
Nightly / quiche (push) Waiting to run
Nightly / fuzz (push) Waiting to run
Nightly / http3_test (push) Waiting to run
Semgrep config / semgrep/ci (push) Waiting to run
Stable / quiche () (push) Waiting to run
Stable / quiche (boringssl-boring-crate) (push) Waiting to run
Stable / quiche (openssl) (push) Waiting to run
Stable / quiche_macos (macos-13) (push) Waiting to run
Stable / quiche_macos (macos-latest) (push) Waiting to run
Stable / quiche_ios (aarch64-apple-ios) (push) Waiting to run
Stable / quiche_ios (x86_64-apple-ios) (push) Waiting to run
Stable / quiche_windows (i686-pc-windows-gnu) (push) Waiting to run
Stable / quiche_windows (i686-pc-windows-msvc) (push) Waiting to run
Stable / quiche_windows (x86_64-pc-windows-gnu) (push) Waiting to run
Stable / quiche_windows (x86_64-pc-windows-msvc) (push) Waiting to run
Stable / quiche_multiarch (aarch64-unknown-linux-gnu) (push) Waiting to run
Stable / quiche_multiarch (armv7-unknown-linux-gnueabihf) (push) Waiting to run
Stable / quiche_multiarch (i686-unknown-linux-gnu) (push) Waiting to run
Stable / http3_test (push) Waiting to run
Stable / nginx (1.16.1) (push) Waiting to run
Stable / docker (push) Waiting to run
Stable / android_ndk_lts (arm64-v8a, aarch64-linux-android) (push) Waiting to run
Stable / android_ndk_lts (armeabi-v7a, armv7-linux-androideabi) (push) Waiting to run
Stable / android_ndk_lts (x86, i686-linux-android) (push) Waiting to run
Stable / android_ndk_lts (x86_64, x86_64-linux-android) (push) Waiting to run
2025-01-10 10:35:17 +00:00
Lucas Pardue
9ea2152571 apps: more eagerly attempt to write HTTP response stream data in quiche-server
Previously, the quiche-server HTTP/3 poll() loop would preference writing HTTP
response headers for all received requests ahead of any other data. Once
completed, no attempt to use remaining stream capacity was made. This had the
effect of deferring writing HTTP response content until the next time the read
loop was triggered. Especially noticeable when the path had a high RTT.

This change forces an attempt to write on any writable response streams
immediately after all response headers have been flushed.
2024-10-09 07:15:23 +01:00
Lucas Pardue
6f92884557 apps: fix clippy 2024-09-10 08:34:37 +01:00
Alessandro Ghedini
6ae23f39bd qns: remove unnecessary sleep 2024-09-04 13:00:10 +01:00
Alessandro Ghedini
570f5b9383 qns: use packaged wait-for-it script 2024-09-04 13:00:10 +01:00
Lucas Pardue
0ba4a7484c
apps: clippy fixup (#1823) 2024-07-25 17:19:24 -07:00
Alessandro Ghedini
ac43fa865f apps: keep processing connections after draining one
If a connection doesn't have any more packets to send, we should keep
processing other connections, rather than going back to polling.
2024-06-26 16:27:36 +01:00
Evan Rittenhouse
db993eb2fc apps: retry mio::poll() if it fails 2024-06-12 08:49:07 +01:00
Alessandro Ghedini
9feeadf628 apps: use static source connection ID when fuzzing
The fuzzers hardcode the source connection ID, so we need the fuzz test
cases to match or packets will get rejected early due to unknown CIDs.
2024-04-08 16:32:02 +01:00
Alessandro Ghedini
1ec83b6eff apps: fix 0-RTT and resumption interop tests for the client
In the 0-RTT test there are more than 2 requests, and we are supposed to
only run the first one in 1-RTT and the remaining ones in the resumed
0-RTT connection.
2024-04-04 10:20:08 +01:00
Lucas Pardue
5056c68cbf Revert "constrain ring version to avoid Windows issues"
This reverts commit 45b59aa8f2d6f2e97c2af74f562848fcd0092062.
2024-03-04 11:55:46 +00:00
Divya Bhat
5387d47864
implement path MTU discovery support 2024-03-01 14:40:13 +00:00
Lucas Pardue
45b59aa8f2 constrain ring version to avoid Windows issues 2024-02-22 15:31:31 +00:00
Alessandro Ghedini
85ab56f0ff octets: release 0.3.0 2024-01-25 09:17:16 +00:00
Phil Sorber
af6da808ce
build(deps): update env_logger to mitigate RUSTSEC-2021-0145 2024-01-09 07:19:12 +00:00
xiaolou86
8f5c8e551a fix typos 2023-12-07 09:58:19 +01:00
dependabot[bot]
7815bce434
build(deps): update ring requirement from 0.16 to 0.17
Updates the requirements on [ring](https://github.com/briansmith/ring) to permit the latest version.
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: direct:production
...

Fixes #1678

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 17:01:07 +00:00
Norman Maurer
fb3aa785c0
rename CID methods to be more consistent
Motivation:

Some of the methods used *source_cid* and *destination_cid* in the name while most others uses *scid* and *dcid*. Naming of methods should be consistent to make it easier to discover things.

Modifications:

Rename methods for consistent naming

Result:

Cleanup of public API
2023-11-24 09:49:24 +00:00
Alessandro Ghedini
7ab6a55cfe apps: update to nix 0.27
One notable change is that functions like `setsockopt()` now require
`AsFd` instead of the raw fd, but mio doesn't implement that, so we need
to convert fds explicitly.
2023-08-29 10:05:21 +01:00
lucas
48aac48a18 h3: remove HTTP/3 datagram API
An HTTP/3 datagram is a series of fields carried in a QUIC DATAGRAM frame
payload. In draft 00, draft 11 and RFC 9297 there is a single field,
which is a variable-length integer.

Previously, the h3 module provided support functions that were a thin shim over
quiche's transport-layer datagram methods, which helped with the variable-length
encoding of the first field in the HTTP/3 datagram. However, in the meantime we
spun out the Octets crate, which allows applications to easily handle varints
themselves. Furthermore, changes in specifications like CONNECT-UDP mean that
applications are probably required to do additional processing of varint fields
that might exist after the first field. At this stage, the h3 datagram API
provides minimal utility and in the worst case is confusing for applications
that would use it for different purposes.

This change removes quiche::h3::send_dgram() and quiche::h3::recv_dgram()
functions. Instead applications are now responsible for serialization /
deserialization of HTTP/3 datagrams, with the recommendation being that they use
the Octets crate. This is demonstrated by related changes to the apps.

Since the Octets crate does not provide a C API itself, helper function have
been added to quiche's C API to support varint handling.
2023-08-22 11:28:59 +01:00
Evan Rittenhouse
a5af1f4707
recovery: make initial CWND configurable 2023-08-22 11:25:40 +01:00
lucas
20ce7af910 apps: allow passing custom CA PEM to client 2023-08-21 09:06:17 +01:00
lucas
34a69e42b4 apps: queue response body writes for better scheduling
Previously, as soon as a server received a request, it would try to emit
headers and body during the same cycle. When then body was too large to
send (e.g., due to congestion window) the response would be queued up
for later rounds of writing. This initial send always happened
regardless of a stream's selected priority.

The later rounds of writing explicitly use a writable iterator to step
through the streams. When switching to an iterator that better supports
priority scheduling, streams that are queued are more likely to respect
the selected priority.

With this change, we no longer attempt to write body immediately.
Instead, it is added to the dispatch queue that will be drained in
accordance with the writable iterator.
.
2023-07-04 10:42:07 +01:00
Alessandro Ghedini
648e6dcc9f remove support for pre-RFC versions 2023-06-08 15:13:16 +01:00
Alessandro Ghedini
fd15aa9128 apps: fix Instant -> u64 conversion
Similar to #1483.

Fixes #1531.
2023-06-06 17:22:58 +01:00
Alessandro Ghedini
809875bd99 add method to expose all source CIDs
An application can track these on its own, but quiche already has this
information, so it can easily be exposed.
2023-06-02 14:49:40 +01:00
lucas
0b37da1cc5 apps: use H3_NO_ERROR in HTTP/3 clients 2023-04-20 17:14:01 +01:00
lucas
20e6a15a5a apps: remove siduck
SiDuck was an early attempt to promote interop of QUIC datagrams.
In the meantime, both QUIC datagrams and HTTP datagrams have been
published as RFCs. Furthermore, UDP and IP proxying use cases have
acheived good interop in the wider community.

This change removes SiDuck from the apps.
2023-04-04 17:44:02 +09:00
Alessandro Ghedini
eac98fae15 apps: keep sending packets when a small packet is generated
When small packets are generated, the server only sends a single packet
per RTT, which is not verry efficient.
2023-03-25 08:09:03 +00:00
Alessandro Ghedini
8e478c2f84 apps: add option to disable pacing on the server
Pacing is enabled by default if SO_TXTIME is available, but it can be
useful to disable it completely (e.g. for testing purposes).
2023-03-20 10:02:28 +00:00
lucas
30b83cd1f5 apps: store response priority for retry after block
There are occaisons where the quiche-server will get blocked from
sending response headers. We already cater for this in the application
and store the request headers or body in order to retry once the
stream is reported as writable.

However, in the case of blocked headers, the response priority was
not stored and when the stream was unblocked, quiche-server did not
try to send_response_with_priority(). Together this meant that
responses that were blocked when attempting to send headers would
revert to a default priority.

With this change, we store the original priority that was intended
and make sure to use it on each retry attempt.
2023-02-14 11:03:52 +00:00
Vlad Krasnov
886fe0f9bb
fix new clippy warnings
Tests started failing clippy since rustc version 1.67.
2023-01-27 07:37:54 +00:00
Alessandro Ghedini
0b2c4e2ded fix clippy warnings 2023-01-09 14:28:22 +00:00
Eric Rosenberg
fc7fe52113
fix clippy lints
* fix clippy lints

* clippy for http3_test
2022-11-14 10:34:59 +00:00
Junho Choi
7bf5b3c8f1 apps: add --disable-gso option
Linux GSO will be detected automatically but some cases
(quic-interop-runner) we need a way to explicitly disable it.
2022-09-22 10:36:07 +01:00
lucas
f01e775ebb h3: return InternalError when flow control blocks control stream
When creating a new h3:Connection, quiche attempts to open
unidirectional streams. We care about the control stream
being opened and will return an Error if that can't happen.

In the case where the control stream failure occurred due to
stream ID limits, quiche returns a StreamLimit error to
indicate that.

In the case where the control stream failure occured due to
flow control being too small to send SETTINGS, we would
return a generic Error:Done, which is potentially confusing.

With this change, failures due to flow control are
more clearly marked as InternalError, since this is an implementation
choice. Trace logging has also been added to help better
communicate the control flow through quiche.

To mirror these changes, applications have been updated
with clearer error handling.

Fixes #1249
2022-09-08 09:30:20 +01:00
Eric Rosenberg
63fe5a5e22
h3: support SETTINGS_ENABLE_CONNECT_PROTOCOL 2022-09-07 13:59:18 +01:00
Junho Choi
3131c0d37d apps: add GSO support for server on Linux
When GSO can be enabled (on a supported linux platform),
now quiche-server sends multiple packets using sendmsg()
with GSO.

For non-supported platforms, it should work same as before.
2022-08-26 11:23:43 +01:00
Lohith Bellad
9214311d3a
apps: add pacing support for server
Co-authored-by: Lohith Bellad <lohith@cloudflare.com>
2022-08-26 11:03:10 +01:00
Alessandro Ghedini
21af572b4a refactor per-path stats
Instead of returning stats for all paths from the `stats()` method, add
a new method specific to path stats. This also allows us to return an
iterator for the path stats list, rather than have to collect the
iterator into a `Vec` (thus avoiding an allocation and also having to
iterate over all paths).
2022-08-25 14:00:38 +01:00
lucas
e806c8cce2 apps: display a friendlier message for bad --connect-to
It expects an IP address and port, so let's just say that.

Fixes #1081
2022-08-22 13:48:21 +01:00
Josh Soref
6ef684d29c
Spelling (#1288)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-08-09 14:00:16 +01:00
lucas
8522ec9736 h3: tweak impl Debug for headers to quote fields and escape embedded quotes
Tweaks the Debug format to something more parsable. Restores quiche-apps
format back to a tuple of strings for legacy consumers.
2022-07-12 19:35:22 +01:00
lucas
0b68506748 apps: add limited support for HTTP/3 settings tuning
With this change, add support for three new quiche app CLI options that
control HTTP/3 settings parameter values.

When these options are not provided, the applications will omit sending
the HTTP/3 settings, which by RFC 9114 means that the peer will use the
default values.

When the `--max-field-section-size` option is provided, the setting is
sent with that value.

quiche does not support dynamic QPACK. If the
`--qpack-max-table-capacity` or `--qpack-blocked-streams` options are
provided, their values are clamped to 0 before being sent in a setting.
2022-07-01 16:17:22 +01:00