Commit Graph

797 Commits

Author SHA1 Message Date
dignifiedquire 46c9205c39 feat: introduce rtt_hints for opening paths 2025-12-17 17:04:40 +01:00
ramfox 18604d36be feat: publically export UnorderedRecvStream (#260)
Co-authored-by: “ramfox” <“kasey@n0.computer”>
2025-12-15 20:08:25 +00:00
Rüdiger Klaehn 8dfdc04e13 feat: Introduce UnorderedRecvStream newtype (#257)
* Introduce UnorderedRecvStream newtype and remove unordered flag from recv_chunk

The only way to do unordered reads is now via the UnorderedRecvStream.

UnorderedRecvStream duplicates the API of RecvStream related to stream state

* Fix bench

* Update quinn/src/recv_stream.rs

Co-authored-by: Floris Bruynooghe <flub@n0.computer>

* Update quinn/src/recv_stream.rs

Co-authored-by: Floris Bruynooghe <flub@n0.computer>

* Add links to docs.

* Add doc comment to UnorderedRecvStream.

* Remove IllegalOrderedRead in quinn.

We do not remove ReadableError::IllegalOrderedRead in quinn-proto, since
using the current quinn-proto API you can still get it.

So we need to panic in the (single) place where we convert a ReadableError
to a ReadError.

* Move struct definition closer to impl

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2025-12-15 15:52:45 +00:00
Friedel Ziegelmayer f437716e1b Update quinn upstream (#227)
* Take semver-compatible dependency updates

* proto: use new constructor where possible

* proto: drop unused From impl

* quinn: import more types

* quinn: remove indirection in connection initialization

---------

Co-authored-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
2025-12-09 09:22:22 +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
Friedel Ziegelmayer 79aa0f8092 fix!: use PathId in more APIs and remove Connection::network_path_changed (#210)
* chore: add more Debug derives

* fix: do not unconditionally use path 0 in APIs

* fix(quinn): reexport PathId

* fixup: debug for controllermetrics

* cleanup and remove `network_path_changed` api
2025-12-06 09:27:27 +00:00
Friedel Ziegelmayer 988efd8578 fix: cleanup path closing errors (#221)
- update names to more closely match the RFC
- pass a fixed error code when the application closes the path

Closes https://github.com/n0-computer/iroh/issues/3633
2025-12-05 18:58:22 +00:00
Diva Martínez fc35922d64 refactor: split client and server hp state (#214)
* clearly differentiate client and server states

This makes reasoning much easier since only the required fields are
present in the corresponding side state. It also reduces state size, now
it's 112 bytes, before it was 160 bytes

* apply clippy fixes

* fmt
2025-12-04 08:58:21 +00:00
Asmir Avdicevic 2f508d5ab2 fix: fmt & spelling 2025-12-02 12:39:06 +00:00
Asmir Avdicevic 35f654b0c0 ci: fix more workflows 2025-12-02 13:24:18 +01:00
Philipp Krüger 083fb7076f Merge remote-tracking branch 'origin/main-iroh' into matheus23/fix-path-status-send 2025-12-02 11:31:27 +01:00
Philipp Krüger 661cbd6f83 Revert OpenPathError -> PathError and NotOpen rename. 2025-12-02 11:31:19 +01:00
Philipp Krüger 4f47e27bfc fmt 2025-12-02 09:48:25 +01:00
Philipp Krüger ca1b4ffbcf fix: Don't allow sending path status frames on non-multipath connections 2025-12-01 18:36:30 +01:00
dignifiedquire c8a655c4b4 Merge remote-tracking branch 'upstream/main' into chore-merge-upstream 2025-12-01 14:08:32 +01:00
Mateusz Szczygieł 67ededbc9e Add an option to retrieve TLS errors
Signed-off-by: Mateusz Szczygieł <mateusz.szczygiel@nordsec.com>
2025-11-26 09:55:39 +00:00
Marcus Medom Ryding 5334839f95 Track handshake confirmation 2025-11-26 09:31:13 +00:00
Dirkjan Ochtman f90254a410 quinn: statically hide default_runtime() if unavailable 2025-11-26 05:59:25 +00:00
Floris Bruynooghe ee88899858 Change APIs to set addresses 2025-11-21 16:34:16 +01:00
Dirkjan Ochtman 1ffd9cd83f quinn: simplify cfg guards for runtime-smol 2025-11-18 08:26:03 +00:00
Dirkjan Ochtman 4c17321999 quinn: rename async_io module to smol 2025-11-18 08:26:03 +00:00
Dirkjan Ochtman 42bc17f812 quinn: move runtime module to be closer to its child modules 2025-11-18 08:26:03 +00:00
Diva Martínez 49b750d5f2 Return the remotely advertised nat traversal addresses instead 2025-11-17 16:24:36 -05:00
Cathal Mullan 35cefdd003 Bump MSRV to 1.80, remove once_cell and lazy_static deps 2025-11-14 18:29:03 +00:00
Diva Martínez d63019020d Merge remote-tracking branch 'n0/main-iroh' into protocol-simplification 2025-11-14 11:51:05 -05:00
Diva Martínez 86aea3e5cc fix docs 2025-11-13 14:22:20 -05:00
Diva Martínez ed1dfea1cf Send the reach out frames, probe server addresses 2025-11-13 13:16:22 -05:00
Diva Martínez 6dc2ba1c40 Boilerplate threading the nat traversal round call 2025-11-10 01:14:30 -05:00
Diva Martínez 38d73d0fef Thread server updates about addresses 2025-11-10 00:20:42 -05:00
Diva Martínez 9dab34f629 Add how to query the local nat traversal addresses. 2025-11-09 23:29:54 -05:00
Frando edb72f9e7c refactor: split path stats from connection stats 2025-11-07 10:34:42 +01:00
Diva Martínez fd756af1ce thread removing addresses 2025-11-06 13:57:59 -05:00
Diva Martínez 12fe8a0478 thread adding addresses 2025-11-06 13:31:55 -05:00
Diva Martínez b77d066584 make some types public 2025-11-06 12:53:42 -05:00
Franz Heinzmann 19817fcc9b feat: add Connection::on_close to get notified on close without keeping the connection alive (#153)
* feat: add Connection::on_closed

* fix: make sure to always trigger on_closed senders

* docs and tests

* refactor: make OnClosed public, improve docs

* fixup test

* typo
2025-11-06 18:06:09 +01:00
Floris Bruynooghe d6dcb2d33c Improve docs (#161) 2025-10-28 11:49:35 +01:00
Divma a4597406bf Fix connection's mtu calculation (#151)
* calculate this connection's mtu as the minimum across all paths

* add TODO to check buffer reserving

* improve docs

* apply clippy fixes

* more docs tweaks

* second perspective on TODO

* spelling

* address TODO: reserving is already done in poll_transmit with the appropiate sizes
2025-10-17 14:17:51 -05:00
Floris Bruynooghe ef19d53391 Fix remote addresses in paths (#141)
* Fix remote addresses in paths

- Remove quinn_proto::Connection::remote_address.  You should use
  path_remote_address now.

- Change quinn::Connection::remote_address to return *any* remote
  address from any of the open paths.

- Fix opening paths on IPv4 addresses, when the endpoint supports
  IPv6.

  When the endpoint supports IPv6 it uses IPv4-mapped IPv6 addresses
  for IPv4 remotes.  This is enforced when establishing a connection,
  and quinn-udp automatically does this for incoming datagrams.
  However when opening a path we should do the same mapping.
  Otherwise we will end up with an IPv4 remote address in the PathData
  and incoming datagrams will come from an IPv6 address and be
  dropped.

* fix tests
2025-10-14 17:39:08 +02:00
Floris Bruynooghe 61381971aa Allow setting the status of a path (#140) 2025-10-14 17:31:44 +02:00
Floris Bruynooghe a63efb2d02 Make Path impl fmt::Debug (#138) 2025-10-10 17:45:06 +02:00
Floris Bruynooghe 5cab4537d9 Fix WeakConnection::upgrade (#132)
* Fix WeakConnection::upgrade

It created a ConnectionRef that did not increment the manually-tracked
reference count inside the Arc<ConnectionInner>.  This triggered the
ConnectionRef's Drop impl to actually drop the connection.

This works around this by using the fact that the ConnectionRef's
Clone impl does know how to manipulate the reference count in a way
that works together with the ConnectionRef's Drop.  I think this is
preferred over manipulating the ref_count directly in the
WeakConnectionHandle since that code is closer by.

* Nicer implementation
2025-10-03 12:43:19 +02:00
Floris Bruynooghe df461f1500 Expose the remote address of a path (#133) 2025-10-03 09:50:43 +02:00
Floris Bruynooghe 1053f8ed28 Allow the WeakConnectionHandle to be cloned (#131) 2025-10-02 16:23:42 +02:00
Floris Bruynooghe 9ba8b774fa Add OpenPath::path_id and some docs (#127)
* Add OpenPath::path_id and some docs

* Try and word this a little better
2025-10-02 10:47:36 +02:00
Diva M 56a5a35f38 fixes to make everything work together 2025-10-01 13:22:35 -05:00
Diva M 4d39665d48 Revert Dig's merge fixed to bring back const
This reverts commit 44a3dc6e45.
2025-10-01 13:22:24 -05:00
Philipp Krüger 2e95861ce8 Store a Box<dyn AsyncUdpSocket> instead of Arcing it, make poll_recv take &mut self 2025-10-01 13:21:08 -05:00
Philipp Krüger 42a39e7b69 Refactor UdpPoller into UdpSender and use it in favor of AsyncUdpSocket in connections 2025-10-01 13:21:04 -05:00
Dirkjan Ochtman 0e2d551c27 Remove more traces of async-std 2025-10-01 13:20:43 -05:00
Dirkjan Ochtman 04c1aaf1e6 quinn: drop async-std support 2025-10-01 13:19:43 -05:00