Commit Graph

109 Commits

Author SHA1 Message Date
Dirkjan Ochtman d4f61c1088 Upgrade rustls-platform-verifier to 0.7
(cherry picked from commit bda24fdae5)
2026-04-22 15:15:19 +02:00
Philipp Krüger 17ce182276 refactor(proptests): Replace different proptests with a single proptest with a generated PairSetup (#589)
## Description

Now depends on #590 merging first so the added test coverage actually
passes.

This replaces three different proptest functions (`random_interaction`,
`random_interaction_with_multipath_simple_routing` and
`random_interaction_with_multipath_complex_routing`) with a single
`random_interaction` function with a `PairSetup` proptest parameter that
effectively generates the different proptest cases these functions
generate (and more!).

This also:
- fixes a bug where we were never generating a transport config that
would allow testing any QNT operations ever
- fixes a bug in the `Arbitrary` impl for `ArrayRangeSet` that required
filtering out empty `ArrayRangeSet`s after the fact instead of
generating them without them possibly being empty in the first place
- improves the cargo-make scripts to enable optimizations for
longer-running proptests, reducing runtime together with compliation
time overall

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
2026-04-15 06:58:31 +00:00
Floris Bruynooghe fd8e5bafe0 refactor(proto): Move FrameStats into PathStats (#521)
## Description

This moves the FrameStats into the PathStats, allowing us to check
what frames where sent on which paths. It then makes the
ConnectionStats always be computed to be the sum of all the PathStats.

This has as a nice side effect that some stats no longer need to be
recorded twice. Which was also error-prone.

The PathStats are now boxed in the PathEvent because that variant was
now way bigger than any of the other variants.

It also fixes a few missed fields in the stats code and uses more
defensive code so that won't happen again.

## Breaking Changes

Probably none? I'm only adding some fields to PathStats on the public
API, while the fields on ConnectionStats remain the same.

## Notes & open questions

I need this to be able to write tests that assert frames on specific
paths. But I also think that generally this makes more sense. The
previous version of the stats was thrown together without much thought
I think (by me).

I've cleaned up some cargo.toml mistakes that accumulated by using
tooling that doesn't follow the sorting/and locations of where things
live.
2026-03-24 16:28:00 +00:00
Philipp Krüger 1280ffd01b chore(proto): Update to rand 0.10 (#511)
## Description

This updates noq and its dependencies to rand 0.10 and getrandom 0.4.

## Breaking Changes

I don't think there are any of rand's APIs exposed in noq or noq-proto.
So no breaking changes.

## Notes & open questions

~~Blocked on https://github.com/tomtomwombat/fastbloom/pull/27 being
released.~~ We can disable the rand feature for fastbloom instead.

`proptest` still depends on rand 0.9:
```
$ cargo tree -i rand@0.9
rand v0.9.2
└── proptest v1.9.0
    [dev-dependencies]
    └── noq-proto v0.16.0 (/home/philipp/program/work/noq/noq-proto)
        ├── noq v0.17.0 (/home/philipp/program/work/noq/noq)
        │   ├── bench v0.2.0 (/home/philipp/program/work/noq/bench)
        │   └── perf v0.2.0 (/home/philipp/program/work/noq/perf)
        └── perf v0.2.0 (/home/philipp/program/work/noq/perf)
```
But it's only a dev-dependency, so won't get pulled in for people
depending on noq.
2026-03-23 10:37:34 +00:00
Floris Bruynooghe caf22ae6f8 refactor(clippy): enable manual_let_else lint and fix code (#500)
* refactor(clippy): enable manual_let_else lint and fix code

I'd like to slowly turn on more and more linting.

* cargo format
2026-03-13 08:26:07 +00:00
Philipp Krüger 13a1c456f5 feat!: Allow compiling with rustls, but without any crypto providers compiled into rustls (#462)
* Switch to `aes-gcm` crate for retry token logic when using rustls

* Split `rustls-ring` and `rustls-aws-lc-rs` features into `rustls`, `ring` and `aws-lc-rs` features.

* Better document the features.

* `cargo make format`

* Fix outdated feature references

* Avoid double-defining `configured_provider`

* File an issue about suddenly working PQC handshakes now breaking a test

* Fix rebase

* Only enable `aes-gcm` dependency when needed

* Add features for backwards compatibility

* Add some links to the spec's retry packet integrity section
2026-03-02 11:56:51 +00:00
Friedel Ziegelmayer 294e3ea603 refactor!: rename to noq (#461)
* refactor!: rename to noq

* fixup python scripts

* fixup

* fixup

* fixup: cr
2026-02-27 14:57:21 +00:00
Friedel Ziegelmayer 708a6a0119 fix(quinn-udp): more wine fixes (#414)
* fix(quinn-udp): disable IP_PKTINFO under Wine

Wine's IP_PKTINFO implementation maps Linux's ipi_addr (the IP header
destination address) to Windows' IN_PKTINFO.ipi_addr. On multi-homed hosts,
ipi_addr and ipi_spec_dst (the local address) can differ, causing QUIC to
discard packets with 'sent to incorrect interface'.

This commit:
- Detects Wine at runtime via ntdll.dll's wine_get_version export
- Disables pktinfo when running under Wine (both send and recv paths)
- Exports is_wine() from the crate for use by downstream tests
- Skips the local_ip assertion in echo tests under Wine
- Upgrades windows-sys to 0.61

See:
- Wine's convert_control_headers(): https://github.com/wine-mirror/wine/blob/master/dlls/ntdll/unix/socket.c
- Linux in_pktinfo fields: https://man7.org/linux/man-pages/man7/ip.7.html
- Windows IN_PKTINFO: https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-in_pktinfo

* apply CR

* fixup

* cleanup
2026-02-06 17:24:48 +00:00
Franz Heinzmann f89efda9d6 refactor: use named future for SendStream::stopped (#409)
* refactor: use named future for SendStream::stopped

* address review

* deps: bump min tokio version to 1.47
2026-02-06 10:41:42 +00:00
Rüdiger Klaehn 1df76577f7 tests: Add proptest arbitraries for various quinn-proto types and implement encoder roundtrip tests. (#325)
* Add proptests for encode/decode

* Add proptest arbitrary for VarInt and StreamId

Also fix the StreamId arbitrary::Arbitrary generation

* Add proptest arbitraries for various quinn-proto types and make use of them in the random interaction test

* Add more arbitraries.

* Remove unneeded derives

* Use MaybeFrame arb

* fmt

* Use cfg(test) for the arbitraries.

Also move the encode_decode tests into a separate file.

* Add more cases to TestFrame

* Get rid of the last remaining record enum cases.

* More arbitraries. Now almost every frame type is roundrrip tested.

* remove dead code

* clippy

* Add proptest and test-strategy even in wasm

(we don't *run* proptests, but need them to compile)

* Use a feature flag after all...

going in circles...

* Remove claude settings and DRY the proptest attribute.

* Revert "Use a feature flag after all..."

This reverts commit b27add632b.

* Try to get proptest to work in wasm after all

It doesn't need to run tests, just compile.

* Use the right hmac import

* sort dev deps

* Remove some feature flag gated imports

they are not worth it in terms of DRY

* Use test_strategy::Arbitrary by default in frame. It gets used way more often.
2026-01-19 09:35:31 +00:00
Floris Bruynooghe 5f19d75275 refactor: Update to rust edition 2024 (#328)
* refactor: Update to rust edition 2025

* bump to 1.88

That's what I need for let chains.

* i asked for let chain, clippy looooooves the let chains!

* more let chains in the workspace
2026-01-15 15:41:35 +00:00
Dirkjan Ochtman 5c4255a74d Warn on clippy::or_fun_call 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman fbfcf5ff3b Warn on unnameable_types 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman 91a4281c7f Warn on elided_lifetimes_in_paths 2026-01-12 16:46:28 +01:00
Dirkjan Ochtman 6cb31438bb Hoist lint configuration to the workspace level 2026-01-12 16:46:28 +01:00
Rüdiger Klaehn 65c66d5929 deps: switch to criterion for benching (#262)
* Switch from bencher to criterion

* clippy

* MSRV
2025-12-16 10:24:03 +00:00
Philipp Krüger 5e51c98783 test: Add code to programmatically generate interaction patterns with quinn-proto (#193)
* fix: Don't allow sending path status frames on non-multipath connections

* fix: Ignore PATH_ACKs on abandoned paths

* test: Implement a quinn-proto multipath proptest & add regression tests

* Restructure proptests, fix "invalid key" access in test endpoints

* Turn of MTUD

* Add another regression test

* fix: Correctly check `space.rx_packet` in key updates

Also refactor `PacketNumberSpace::rx_packet` to be an `Option<u64>` instead of `u64`.

* Smaller test case

* fix accepting packets from other remotes.

* Increase the iterations in `drive_bounded`

* Remove proptests itself

* Cargo.lock update fix after merge

* fix imports

* fix merge

* self-review

* cfg-gate proptests

* Implement `RoutingTable` instead of `multipath_addrs`

* Keep connection handles around, but don't use them when drained

* Fix all tests

* Reintroduce proptests

* Move random interaction running tests into submodule

* Implement more complex route table generation

* Prefer `Self::`

* refactor: Prefer not duplicating quinn-proto types

* Don't track `path_ids` in `State`, but fetch them from `Connection`

* Extract out `TestOp::run`

* Reorder things

* Add close operation

* Properly use short-circuiting

* Add holepunching APIs to proptests

* Revert accidental changes

* Return the `ConnectionError` from `Connection::handle_event`

* Revert "Return the `ConnectionError` from `Connection::handle_event`"

This reverts commit 713e17465f.

* Check `Connection::state` in proptests instead of adding a panic_on_transport_error config

* Properly check for transport errors

* `cargo fmt`

* Cfg out `random_interaction` module in Wasm

* format

* Cleanup, fix all clippy issues

* Code review
2025-12-09 12:45:37 +00:00
Rüdiger Klaehn bad9ca2abd refactor: Use array based data structure for sent_packets instead of BTreeMap (#202)
* WIP add new packet buffer

* Use git dep

* Use PacketBuf for lost_packets as well

* Use published sorted_index_buffer

* fmt

* Get rid of MSRV warning

* fix dependency sort order
2025-12-09 11:21:56 +00:00
Franz Heinzmann abbe27bf07 feat!: update qlog to latest drafts, add more events and QUIC extensions, emit traces per connection (#208)
* refactor: upgrade to latest n0-qlog

* feat: record path id

* feat: add qlog support for multipath frames

* support more frames and error codes

* feat: add support for quic-address-discovery and quic-ack-frequency extensions

* feat: support iroh's NAT traversal extension

* feat: emit TupleAssigned for new paths

* fixup

* chore: update to latest n0-qlog

* feat: emit TransportParameters

* chore: clippy

* deps: update to n0-qlog 0.1.0

* refactor: add qlog factory, move group_id to common_fields

* docs: improve

* chore: clippy

* fixup

* feat: add QlogFileFactory and util methods on TransportConfig

* feat: reexport from quinn

* chore: clippy

* feat: qlog timers

* add more timers

* docs: improve

* refactor: disable keep alive timers in qlog to reduce noise

* address review

* fix: downgrade logging

* cleanup

* fixup naming

---------

Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
2025-12-06 10:07:30 +00:00
Asmir Avdicevic 35f654b0c0 ci: fix more workflows 2025-12-02 13:24:18 +01:00
dignifiedquire c8a655c4b4 Merge remote-tracking branch 'upstream/main' into chore-merge-upstream 2025-12-01 14:08:32 +01:00
Cathal Mullan 35cefdd003 Bump MSRV to 1.80, remove once_cell and lazy_static deps 2025-11-14 18:29:03 +00:00
Friedel Ziegelmayer 817a1b565d perf: implement more efficient timeouts and MSRV to 1.83 2025-11-04 22:38:50 +01:00
Floris Bruynooghe 2d68ea5303 Switch to released rustls (#152) 2025-10-17 11:00:04 -05:00
Floris Bruynooghe 3820a0ae48 upgrade rustls to 0.23.29 to match iroh (#134) 2025-10-06 12:38:49 +02:00
Dirkjan Ochtman 0e2d551c27 Remove more traces of async-std 2025-10-01 13:20:43 -05:00
Diva M f2e4efead3 Merge commit 'b2b930a0662b18b2e351264a21e175478bb3c3f1' into multipath-quinn-0.11.x-b2b930a-merges 2025-09-30 10:00:23 -05:00
Diva M f75aa3b442 Merge commit 'bb46d09f00c14ddedca9c88dc961225ac7dd4a4e' into multipath-quinn-0.11.x-b2b930a-merges
# Conflicts:
#	.github/workflows/book.yml
#	.github/workflows/rust.yml
2025-09-30 09:58:26 -05:00
Dirkjan Ochtman 3e302f7282 Upgrade windows-sys to 0.61 2025-09-08 20:31:52 +00:00
Dirkjan Ochtman 80b8ffdb4b Use newer rustls-pki-types PEM parser API 2025-09-02 17:46:40 +00:00
Dirkjan Ochtman 0e5834ca32 Remove more traces of async-std 2025-09-01 19:00:40 +00:00
Dirkjan Ochtman 78a5a6a884 Upgrade to fastbloom 0.14 2025-08-27 20:15:14 +00:00
dependabot[bot] bb46d09f00 build(deps): bump windows-sys from 0.59.0 to 0.60.2
Bumps [windows-sys](https://github.com/microsoft/windows-rs) from 0.59.0 to 0.60.2.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-version: 0.60.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 10:20:28 +00:00
Floris Bruynooghe 143eb1b815 Merge branch 'main' into multipath-quinn-0.11.x 2025-08-02 17:14:02 +02:00
Max Leonard Inden 253b3885f6 chore(Cargo.toml): support both socket2 v0.5 and v0.6
Enables quinn-udp users like Firefox to gradually upgrade to socket2 v0.6.
2025-07-07 19:45:04 +00:00
Dirkjan Ochtman 64139181e0 Upgrade to fastbloom 0.12 2025-07-05 20:00:45 +00:00
Thomas de Zeeuw 68041e16e6 Update to socket2 v0.6 2025-07-05 10:00:15 +00:00
Fabien Savy de732c25c1 collect recovery metrics with qlog 2025-07-04 07:57:47 +00:00
Fabien Savy 01d4a59b46 bump MSRV to 1.74.1 2025-07-04 07:57:47 +00:00
Dirkjan Ochtman 8339ef3ccc Upgrade rcgen to 0.14 2025-07-02 19:27:49 +00:00
Dirkjan Ochtman 51514a902f Upgrade hex-literal to 1 2025-07-02 19:27:49 +00:00
Dirkjan Ochtman e8fa80432f proto: upgrade to rustls-platform-verifier 0.6 2025-06-23 08:26:20 +00:00
Floris Bruynooghe 2d54bac314 Merge branch 'main' into multipath-quinn-0.11.x 2025-05-22 16:00:22 +02:00
Phoenix Kahlo 15103ee887 Add BloomTokenLog
- Adds default feature `bloom`.
- It enables a new BloomTokenLog implementation of TokenLog.
- It enables a dependency on the `fastbloom` crate.
2025-05-07 04:37:29 +00:00
Phoenix Kahlo 0b5762efaa Add TokenMemoryCache
TokenMemoryCache is a new implementation of TokenStore.

TokenMemoryCache is designed to store up to 2 tokens per server (this is
configurable) for up to 256 servers (this is also configurable), with a
LRU eviction policy. This is so that it works harmoniously with
rustls::ClientSessionMemoryCache, which by default stores resumption
state for up to 256 servers with a LRU eviction policy.
2025-05-07 02:36:17 +00:00
Floris Bruynooghe deba4ee85f Merge branch 'main' into multipath-quinn-0.11.x 2025-04-10 12:36:01 +02:00
kota-yata 41f7d2ea8f docs: separate example code from document
separate certificate's examples out of md file into rs files

format
2025-03-30 11:59:02 +00:00
Dirkjan Ochtman f4172ea3a2 Upgrade to rand 0.9 2025-01-30 23:29:12 +00:00
Divma af1b428d4e include path_id in packet protection (#36) 2025-01-24 11:29:06 -05:00
Philipp Krüger a5e9504952 feat(quinn,quinn-udp): Disable socket2 and std::net::UdpSocket dependencies in wasm/browser targets 2025-01-22 04:25:48 +00:00