Commit Graph
186 Commits
Author SHA1 Message Date
Marco Meyer-Conde    メイヤーマルコandFloris Bruynooghe 5b98ddbaeb feat(iroh-relay): keep the relay URL's path prefix (#4617)
<!-- Attention agents and contributors using AI, please see our AI
policy before opening a PR:
https://github.com/n0-computer/iroh/blob/main/AI_POLICY.md -->
<!-- Any PRs violating this policy will be closed. -->

<!-- As per our contributor guidelines, all PRs that do not link to an
issue with the label `ready-for-pr` will be closed:
https://github.com/n0-computer/iroh/blob/main/CONTRIBUTING.md -->

## Description

Fixes: #2440

* Adds `RELAY_RELATIVE_PATH` (`"relay"`) and `RELAY_PROBE_RELATIVE_PATH`
(`"ping"`), which join onto a relay URL that carries a path prefix
(`https://example.com/prefix/`) instead of landing on the host's root.
* `RELAY_PATH` and `RELAY_PROBE_PATH` keep their values and are
deprecated.
* The client and the HTTPS probe join the relative paths onto the relay
URL with `Url::join`; the relay server routes `/{RELAY_RELATIVE_PATH}`
and `/{RELAY_PROBE_RELATIVE_PATH}`.
* `RelayUrl`'s `From<Url>` (and so `FromStr` and `Deserialize`) adds a
trailing `/` to a path that lacks one, with an INFO message, so
`https://example.com/prefix` works too. `iroh-base` now depends on
`tracing` (with the `relay` feature).
* Relay URLs without a path behave as before.

## Breaking Changes

None.

## Notes & open questions

A `RelayUrl` without the trailing slash, serialised before this change,
gains it when read back.

## Change checklist

- [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.
- [x] Tests if relevant.
- [x] All breaking changes documented.

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2026-10-29 16:53:55 +00:00
ramfox d6c6963b96 chore: Release 2026-10-21 13:06:43 -04:00
ramfox efcb1c3f98 chore: fix changelog (#4628)
We had stray headers throughout the file. I thought I fixed this last time, but thankfully the latest version of git-cliff (`2.14`) adds a tag in the file to ensure this does not keep happening.
2026-10-21 12:04:24 -04:00
ramfox 55908a5809 chore: Release 2026-10-20 13:41:33 -04:00
ramfox 0072d7d84b chore: release 2026-09-28 15:14:45 -04:00
“ramfox” 17c0612f80 chore: Release 2026-09-09 15:19:05 -04:00
“ramfox” fddf1a4ce2 chore: Release 2026-08-25 14:49:25 -04:00
Rüdiger Klaehn 4706ec97e9 fix!: Fix serialization of CustomAddr so that the data serializes the same as a Vec<u8> (#4465)
## Description

Fix serialization of CustomAddr so that the data serializes the same as
a Vec<u8>

This is needed so the inline size remains an implementation detail. It
breaks CustomAddr deser, but that is fine since custom addresses, while
being stable, are only used in conjunction with a feature cleary marked
as experimental.

## Breaking Changes

Does not change the public API, but does change the serialization of
CustomAddrs. I think we don't need a iroh-base 2.0 regardless because
you only create or use CustomAddrs when working with the experimental
custom transports that are explicitly excluded from stability
guarantees. YMMV.

## Notes & open questions

Note for next release: we technically break serialization format for
CustomAddr, so we should add the rationale for not going to 2.0 to the
release notes.

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] This PR was created by a human that thought critically about the
      proposed change and wrote an as clear and concise description as
      they could.
- [ ] This PR isn't slop, and is carefully crafted to do have the
      intented effect.
2026-08-10 16:53:19 +00:00
“ramfox” e5c710a29f chore: Release 2026-07-20 15:27:40 -04:00
Floris Bruynooghe 57fb5c2805 deps: Allow GA releases of curve25519-dalek and ed25519-dalek (#4416)
## Description

This allows all of the -rc0, -rc1 and the GA releases of the
curve25519-dalek and ed25519-dalek crates. Giving downstream users the
flexibility to use either of them.

The pieces that iroh depends on have no breaking changes, so iroh can
work with both.

## Breaking Changes

None.

## Notes & open questions

Alternative to #4407.
Closes #4415.

Tested using this manifest on a new project:

``` toml
[package]
name = "testproj"
version = "0.1.0"
edition = "2024"

[dependencies]
# curve25519-dalek = "5.0.0"
# ed25519-dalek = "3.0.0"
curve25519-dalek = "5.0.0-rc.0"
ed25519-dalek = "3.0.0-rc.0"
iroh = "1.0.2"

[patch.crates-io]
iroh = { path = "/home/flub/n0/iroh/iroh" }
iroh-base = { path = "/home/flub/n0/iroh/iroh-base" }
```

Both versions seem to work. But please check if this makes sense. I
was a little surprise by this myself.

## Change checklist

- [x] Self-review.
- [x] All breaking changes documented.
- [x] This PR was created by a human that thought critically about the
      proposed change and wrote an as clear and concise description as
      they could.
- [x] This PR isn't slop, and is carefully crafted to do have the
      intented effect.
2026-07-15 12:05:06 +00:00
“ramfox” c3ccf502c3 chore: Release 2026-07-06 16:51:32 -04:00
“ramfox” ead46e5082 chore(*): add release configuration for generating the changelog 2026-07-06 16:32:28 -04:00
dignifiedquire 1ef462615e chore: Release 2026-06-29 12:38:47 +02:00
Lixin2026andFloris Bruynooghe 80548cef7a docs: update license links to HTTPS (#4365)
## Description

- Update Apache-2.0 and MIT license URLs in README files from HTTP to
HTTPS.
- Keep the local LICENSE links and license text unchanged.

## Breaking Changes

None.

## Notes & open questions

Docs-only change. Verified both HTTPS license URLs resolve successfully,
and ran `git diff --check`.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the style guide, if relevant.
- [x] Tests if relevant. Not applicable; link-only documentation update.
- [x] All breaking changes documented. No breaking changes.

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2026-06-23 09:31:47 +02:00
dignifiedquire 6520cd6c9b chore: Release 2026-06-15 14:50:05 +02:00
Friedel ZiegelmayerandFrando b193191c92 feat!: update to 1.0 dependencies (#4343)
also cleans up some dependencies and updates staging relay urls

Co-authored-by: Frando <frando@unbiskant.org>
2026-06-15 14:38:11 +02:00
Franz Heinzmann 01e74bc1ec docs: general cleanup and fixes (#4328)
## Description

This is a cleanup pass over all docs of public items. Fixes typos, odd
grammar, non-adherence to doc guidelines, and other minor things.
2026-06-11 14:31:59 +02:00
Franz Heinzmann 33a92f13cf deps: update ed25519-dalek and curve25519-dalek (#4324)
## Description

Updates `ed25519-dalek` to `=3.0.0-rc.0` and `curve25519-dalek` to
`=5.0.0-rc.0`. Not sure if the final release will be made in time. We
can do a minor release though once the final version comes out. It will
be "semi-breaking" but there's nothing we can do about it then (builds
will break for people who have `=3.0.0-rc.0` in their *own* Cargo.toml).
2026-06-11 11:58:05 +02:00
dignifiedquire ee8b6a3d93 chore: Release 2026-05-27 10:56:35 +02:00
Friedel Ziegelmayer 502b57935d feat!: update to noq@1.0.0-rc.1 (#4287) 2026-05-27 10:53:05 +02:00
Matthias Beyer f8b066cc34 refactor(base): expose SignatureParsingError (#4285)
This was missed in the public API cleanup

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2026-05-26 21:02:19 +02:00
Franz Heinzmann a7d896b634 chore: improve check-external-types setup (#4250)
## Description

Define the list of allowed types per crate instead of globally, and add
a `cargo make` task to run the checks locally.

## Change checklist
- [x] Self-review.
2026-05-19 11:43:04 +02:00
dignifiedquire 96b4b0e80d chore: Release 2026-05-07 16:59:04 +02:00
Friedel Ziegelmayer 20350e9bf6 feat!: update to 1.0.0-rc.0 deps (#4237)
## Description

Update deps to their latest versions

Depends on 

- [x] https://github.com/n0-computer/patchbay/pull/40
- [x] https://github.com/n0-computer/net-tools/pull/141

## Breaking Changes
⚠️  Bumps MSRV to `1.91`

The MSRV bump is required due to a dependency on `cargo-meta` which is
already on 1.91.
2026-05-07 16:53:06 +02:00
Teoh Han HuiandFriedel Ziegelmayer 80dfb19383 feat(iroh-base): impl From<&[u8; 32]> for SecretKey (#4181)
## Description

Add `From<&[u8; 32]>` implementation for `SecretKey`

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)

Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
2026-05-04 11:52:22 +02:00
Emil Sayahi 800ac00d42 chore(deps): update sha2 and sha1 to 0.11 2026-05-04 09:28:29 +02:00
Franz Heinzmann d20e72a647 refactor(iroh, iroh-relay)!: Reduce visibility of items (#4168)
## Description

* Make `iroh_relay::server::streams::MaybeTlsStream` private. I don't
see it being used in any public API, and it exposes `tokio_rustls` in
the public API
* Add `deny(unreachable_pub)` to all crates and fixup accordingly

## Breaking Changes

* removed: `iroh_relay::server::streams::MaybeTlsStream` is no longer
part of the public API

## Change checklist

- [x] Self-review.
- [x] All breaking changes documented.
2026-04-23 21:11:09 +02:00
Rüdiger Klaehn 0527bd5494 refactor!: Move EndpointInfo and friends to iroh-dns (#4094)
## Description

As suggested by @Frando: move more dns related stuff from iroh-relay to
iroh-dns.

Builds on top of https://github.com/n0-computer/iroh/pull/4026

## Breaking Changes

- `iroh_relay::dns`: moved to `iroh_dns::dns`
- `iroh_relay::dns::Resolver`: moved to `iroh_dns::dns::Resolver`
- `iroh_relay::dns::DnsResolver`: moved to `iroh_dns::dns::DnsResolver`
- `iroh_relay::dns::Builder`: moved to `iroh_dns::dns::Builder`
- `iroh_relay::dns::DnsError`: moved to `iroh_dns::dns::DnsError`
- `iroh_relay::dns::DnsProtocol`: moved to `iroh_dns::dns::DnsProtocol`
- `iroh_relay::dns::LookupError`: moved to `iroh_dns::dns::LookupError`
- `iroh_relay::dns::StaggeredError`: moved to
`iroh_dns::dns::StaggeredError`
- `iroh_relay::dns::TxtRecordData`: moved to
`iroh_dns::dns::TxtRecordData`
- `iroh_relay::dns::N0_DNS_ENDPOINT_ORIGIN_PROD`: moved to
`iroh_dns::dns::N0_DNS_ENDPOINT_ORIGIN_PROD`
- `iroh_relay::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING`: moved to
`iroh_dns::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING`
- `iroh_relay::dns::DNS_TIMEOUT`: moved to `iroh_dns::dns::DNS_TIMEOUT`
- `iroh_relay::endpoint_info`: moved to `iroh_dns::endpoint_info`
- `iroh_relay::endpoint_info::EndpointInfo`: moved to
`iroh_dns::endpoint_info::EndpointInfo`
- `iroh_relay::endpoint_info::EndpointData`: moved to
`iroh_dns::endpoint_info::EndpointData`
- `iroh_relay::endpoint_info::AddrFilter`: moved to
`iroh_dns::endpoint_info::AddrFilter`
- `iroh_relay::endpoint_info::UserData`: moved to
`iroh_dns::endpoint_info::UserData`
- `iroh_relay::endpoint_info::MaxLengthExceededError`: moved to
`iroh_dns::endpoint_info::MaxLengthExceededError`
- `iroh_relay::endpoint_info::EncodingError`: moved to
`iroh_dns::EncodingError`
- `iroh_relay::endpoint_info::ParseError`: moved to
`iroh_dns::ParseError`
- `iroh_relay::endpoint_info::IROH_TXT_NAME`: moved to
`iroh_dns::IROH_TXT_NAME`
- `iroh_dns::attrs`: made private
- `iroh_dns::attrs::IrohAttr`: made private
- `iroh_dns::attrs::TxtAttrs`: made private
- `iroh_dns::attrs::endpoint_id_from_txt_name`: made private

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2026-04-23 09:48:56 +02:00
dignifiedquire 42d698348b chore: Release 2026-04-17 16:24:44 +02:00
Franz HeinzmannandFriedel Ziegelmayer 321443d01d fix(iroh)!: don't stop address lookup when one service errors (#4126)
## Description

We currently abort address lookup on the first error from *any* service.
This is a bug, we should run each service to completion and only abort
once all completed or failed.

Fixes #4125

Turns out our current errors were not equipped to handle this well.
Refactored into
a) The error returned from an individual address lookup service. This is
just a struct now, because `NoServicesConfigured` didn't ever make sense
here, and `NoResults` is expressed by returning `None` without yielding
items.
b) The error returned from a lookup across all services now has
`NoServicesConfigured` and `NoResults` variants only, where the latter
can contain the errors emitted from individual services


## Breaking Changes

* changed: `iroh::address_lookup::Error` is now a struct. Existing
constructor methods are unchanged.
* changed: `iroh::endpoint::ConnectWithOptsError::NoAddress { source }`:
The `source` field now has type `AddressLookupFailed`, which is a new
error type that can hold errors for *all* failed lookup services

## Notes & open questions

It might be more appropriate to move the new format of the stream right
into `ConcurrentAddressLookup`. However, with the different error type,
it could no longer implement `AddressLookup` - which it arguably doesn't
have to. Maybe that would be the cleaner refactor?

See #4130 

## 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.
- [x] Tests if relevant.
- [x] All breaking changes documented.

---------

Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
2026-04-17 10:12:51 +02:00
Rüdiger Klaehn 382bf3620e refactor: Move to_z32/from_z32 into iroh-base and remove EndpointIdExt trait (#4133)
## Description

Move to_z32/from_z32 into iroh-base and remove EndpointIdExt trait

Ext traits are just not very nice for our users.

## Breaking Changes

removed: iroh_relay::endpoint_info::EndpointIdExt trait and its
re-export from iroh_dns. The to_z32 / from_z32 methods are now inherent
on iroh_base::PublicKey (and therefore EndpointId, which is a type
alias). Callers should drop the use
iroh_relay::endpoint_info::EndpointIdExt; import — the methods resolve
without it.

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2026-04-16 15:29:03 +02:00
dependabot[bot] 14a1e8d9dc chore(deps): bump proptest from 1.10.0 to 1.11.0 (#4052)
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.10.0 to
1.11.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/proptest-rs/proptest/commit/7f1367f9a4dc8440c47b93166a38ed064f63ea8c"><code>7f1367f</code></a>
Merge pull request <a
href="https://redirect.github.com/proptest-rs/proptest/issues/641">#641</a>
from proptest-rs/release-1.11</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/a63bf7eb4e337d76a26a12d3238320acc747551f"><code>a63bf7e</code></a>
proptest-state-machine v0.8.0</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/d86e9ff8655cb9833d5e5772195a2485396656f4"><code>d86e9ff</code></a>
add changelog for <a
href="https://redirect.github.com/proptest-rs/proptest/issues/640">#640</a></li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/794031313b4fe42d2c28bad1765a3d22d0b7b8c0"><code>7940313</code></a>
proptest v1.11.0</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/3ec998c4d6d9c3992cff9284487914aaeea258e6"><code>3ec998c</code></a>
fix <a
href="https://redirect.github.com/proptest-rs/proptest/issues/638">#638</a>
changelog</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/8ceb00cfe53f5cf713cd8c007b1c4b9c7d26f401"><code>8ceb00c</code></a>
Merge pull request <a
href="https://redirect.github.com/proptest-rs/proptest/issues/639">#639</a>
from lukoktonos/bits128</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/9c8df1abb945363924bc216dace9e634f6f11ff9"><code>9c8df1a</code></a>
Merge pull request <a
href="https://redirect.github.com/proptest-rs/proptest/issues/638">#638</a>
from folkertdev/f16-support</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/ca9d8e1458518dc22ba1a1b00c92471ba8e6e746"><code>ca9d8e1</code></a>
changelog <a
href="https://redirect.github.com/proptest-rs/proptest/issues/638">#638</a></li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/a39869f5ee5f5aebf43feefd3fd7fec743e230c9"><code>a39869f</code></a>
imply f16 feat by unstable</li>
<li><a
href="https://github.com/proptest-rs/proptest/commit/85c5ca02764bebeea2cc6261bdf84f9fb9d3eb4c"><code>85c5ca0</code></a>
Merge pull request <a
href="https://redirect.github.com/proptest-rs/proptest/issues/637">#637</a>
from folkertdev/min-max-assoc-constants</li>
<li>Additional commits viewable in <a
href="https://github.com/proptest-rs/proptest/compare/v1.10.0...v1.11.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 17:38:47 +02:00
Franz Heinzmann 36781ad424 refactor(iroh-base)!: change SecretKey::generate to not take an Rng arg (#4075)
## Description

This removes `rand` from the public API of iroh, allowing us to bump
`rand` crates during iroh 1.0.

The only usage in public API was `SecretKey::generate`. This now does
not take a generic arg for the RNG anymore, instead the key is generated
with `rand::rng()`, i.e. rand's default RNG.
Docs are adapted to say that if you want to use a different RNG, use
`SecretKey::from_bytes`.
The downside is that `iroh_base` now depends on `rand` but I think
that's fine I don't see `iroh_base` being used anywhere where rand is
not already in the tree.



## Breaking Changes

* `iroh_base::SecretKey::generate()` does not take a `Rng` generic
argument anymore. Instead, it uses `rand` internally through it default
RNG (`rand::rng`). If you want to use a different RNG, use
`SecretKey::from_bytes` instead.

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
- [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.
- [x] All breaking changes documented.
2026-04-07 12:45:33 +02:00
Franz Heinzmann 3077f172a1 refactor(iroh-base)!: rename CustomAddr::as_vec to CustomAddr::to_vec and improve docs (#4074)
## Description

* renames `CustomAddr::as_vec` to `CustomAddr::to_vec` because it
allocates and rust naming conventions state that `as_` should be free
* expand docs to detail the string and binary encoding formats for
custom addresses
* remove `pub` from fns on non-public `CustomAddrBytes` type

## Breaking Changes

* renamed: `iroh_base::CustomAddr::as_vec` ->
`iroh_base::CustomAddr::to_vec`

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## 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.
- [x] All breaking changes documented.
2026-04-07 11:45:11 +02:00
Franz Heinzmann d803dfecbb refactor(iroh-base)!: don't expose third-party error types in iroh-base (#4073)
## Description

Changes the `KeyDecodeError` in iroh-base to no longer embed errors from
third-party crates to not leak them in public API surface. Also makes
the enum `non_exhaustive`.

## Breaking Changes

* changed: Variants on `iroh_base::key::KeyDecodeError` changed

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2026-04-07 10:55:59 +02:00
Philipp Krüger 5edc1bc536 chore(deps): Update rand and friends to version 0.10 (#3922)
## Description

Updates the `rand` dependency to version 0.10.
As part of that, this also updates `rand_core`, `rand_chacha`, and a
bunch of cryptography crates like `curve25519-dalek`, `ed25519-dalek`,
`digest`, `sha1` and `sha2`. Some of the latter ones to prerelease
versions to enable compilation.

## Breaking Changes

- `iroh::SecretKey::generate`'s `CryptoRng` parameter is now updated
from rand 0.9 to rand 0.10

## Notes & open questions

Although this is ready for review, it's not ready to be merged yet,
because of patched dependencies.

This is the current TODO list:
- [x] ~~fastbloom needs to update to rand 0.10 and make a new release:
https://github.com/tomtomwombat/fastbloom/pull/27~~ (we can just disable
fastbloom's rand feature)
- [x] noq will need to merge https://github.com/n0-computer/noq/pull/511
once unblocked from fastbloom
- [x] swarm-discovery needs updating to hickory 0.26
https://github.com/rkuhn/swarm-discovery/pull/21
- [x] portmapper will need to merge
https://github.com/n0-computer/net-tools/pull/118
- [x] tokio-websockets has released with rand 0.10 support
- [x] igd-next has released with rand 0.10 support
- [x] And finally, hickory has released [a first beta for version
0.26](https://docs.rs/crate/hickory-resolver/0.26.0-beta.1), but it has
*a lot* of API changes and I'm working towards adjusting iroh code to
them.

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
2026-03-30 18:00:15 +02:00
Philipp Krüger 387c2e4fcb feat(iroh): Pluggable crypto backends (#3992)
## Description

- Introduces a `ring` feature flag that enables turning off the ring
dependency
- Introduces a `aws-lc-rs` feature flag that enables using aws-lc-rs as
the crypto provider for rustls for everything TLS in iroh
- Adds `iroh::endpoint::Builder::crypto_provider` allowing anyone to
configure custom crypto providers beyond ring and aws-lc-rs. This is a
required call when neither `ring` nor `aws-lc-rs` are enabled, but will
default to either (preferring ring) if the features are enabled.
- Adds `presets::Empty` and `presets::Minimal`. The latter sets the
minimal set of required options on the builder, but is only available on
the `ring` or `aws-lc-rs` feature flags.
- Removes `Endpoint::empty_builder` in favor of `Endpoint::builder`
together with either the `presets::Empty` or `presets::Minimal`.

Depends on https://github.com/n0-computer/noq/pull/496

## Breaking Changes

- Added `iroh::endpoint::Builder::crypto_provider` for configuring the
crypto provider. After having built the Endpoint, you can get back the
crypto provider via `endpoint.tls_config().crypto_provider()`.
- Removed `Endpoint::empty_builder`. Use
`Endpoint::builder(presets::Empty)` or
`Endpoint::builder(presets::Minimal)` instead.
- **Behavioral**: If you don't call
`iroh::endpoint::Builder::crypto_provider`, you will get an error when
building in the call `Builder::bind()`.

## Notes & Open Questions

It's probably worth asking ourselves if we want to change the way we run
CI now.
Most of our tests are cfg-ed out when you disable *both* the ring and
aws-lc-rs features.
However, maybe we should add another test category that's like
`--no-default-features --feature ring/aws-lc-rs`?
We could call it `minimal` (and I guess we'd have to decide to use
either ring or aws-lc-rs).
2026-03-20 13:08:36 +00:00
dignifiedquire 3d6e26b118 chore: Release 2026-03-16 17:26:42 +01:00
Eugene Korir 766097b0c2 docs: fix typo in documentation comment for generate function (#4001)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Typo fix

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2026-03-07 15:03:29 +00:00
Rüdiger Klaehn d434c85e1b feat: Implement custom transports (#3845)
## Description

Adds user defined transports.

Transports have to impl a dynable trait, currently named
CustomTransport. Implementing this requires implementing another dynable
trait CustomSender. Creating a transport requires implementing yet
another dynable trait CustomTransportFactory.

A custom addr is just an opaque blob with an u64 tranport id. Small
blobs will be inlined, but that is an implementation detail.

Formatting currently is "<id hex>-<data hex>"

Replaces https://github.com/n0-computer/iroh/pull/3707

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

- Question: encoding of custom addrs in DNS records.
- Option 1: addr=1_a1b2c3 (tries to parse first as SocketAddr then as
custom addr)
   - Option 2: custom=1_a1b2c3 (separate IrohAttr::Custom)

- ~~Question: Feature gate or not? User transports require exposing a
bit more of the guts, e.g. transmit fields, so we might want to put this
behind a feature flag that is documented to be not part of the stable
API.~~

- ~~Question: Path selection.~~

~~Currently in select_best_path we never select an user path. For some
reason it still works, but we probably should put in some logic there.~~

    ```rust
        Some((transports::Addr::User(_), _)) => {
            // todo: when should we select an user path?
            None
        }
    ```

- DRY the different mapped addrs?
    
~~We could DRY the 2 differnet mapped addrs a bit more. But once you
start with this you get into a rabbit hole. Should relay transports just
be a special kind of custom transport? If we could abstract the logic
when to choose the relay, this might work. Maybe this is best left for
later.~~

Update: path selection is now taken care of. Basically each path gets a
2-tuple consisting of primary/secondary and biased rtt, then sort and
take the best. There is an API to add a bias for each addr type and also
to configure for each transport if it is a transport of last resort.

Here is how to bias a transport:

```rust
Endpoint::builder()
    .transport_bias(
        AddrKind::Custom(TEST_TRANSPORT_ID),
        TransportBias::primary().with_rtt_advantage(CUSTOM_TRANSPORT_RTT_ADVANTAGE))
    .build().await?;
```

I also added some tests to make sure custom transports work if the ip
transport is enabled.
2026-03-05 11:11:51 +00:00
Franz Heinzmann 08b0b8a381 examples(iroh): add --logs and --mode ping features to transfer example (#3893)
## Description

More improvements to our `transport` example to ease dogfooding:

* new `--logs` flag (for both provide and fetch) for simple file
logging:
- without further config, creates a directory
`./logs/transfer-{cmd}-{date}-{endpoint_id}` and saves logs with
`iroh=trace,transfer=trace` to a `logs` file in that directory.
  - different log level can be set with RUST_LOG
  - different path can be set with `--logs-path`
- qlog files are also written to that directory if the `qlog` feature is
enabled
* New `--mode ping` option for `fetch` command: instead of transferring
as much data as possible, this just keeps the connection open until the
`--duration` is expired (default: 10s). This gives much smaller log
files (both tracing and qlog) so easier to debug when looking for
connection changes only.
* Regular output now includes the time since start after each line.
Useful to interpret the "switched to direct" etc lines after the fact
(they didn't have any time indication so far)
* Better formatting for durations
* Better spans on accept side. Each connection gets an `id` now that
easily allows to grep for that connection through both iroh and quinn
logs
* Print path ids with the paths stats and changes. This allows to
correlate with the tracing logs now.

With both logs and qlog in a single dir it's now really straightforward
to share it eg with sendme.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

Should `--logs` include `iroh_quinn=trace` by default or not?

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2026-02-16 13:17:55 +01:00
“ramfox” 82650d1d1f chore: Release 2026-02-06 12:43:42 -05:00
db429c7149 chore: specify minimum iroh-quinn and iroh-quinn-proto patch versions (#3918)
## Description

prepping for 0.96.1 patch release

Co-authored-by: “ramfox” <“kasey@n0.computer”>
Co-authored-by: dignifiedquire <me@dignifiedquire.com>
2026-02-06 12:42:08 -05:00
Rüdiger Klaehn f2eb1e3c54 chore: Update bytes and time address advisories 2026-02-06 14:38:12 +01:00
Rüdiger Klaehn 68243eda3c chore: Pin digest to version compatible with curve25519-dalek 5.0.0-pre.1 (#3908)
## Description

curve25519-dalek 5.0.0-pre.x for x>1 uses rand 0.10 rc, which we don't
want.
But digest 0.11.0-rc.11 and later no longer work with curve25519-dalek
5.0.0-pre.1

## Breaking Changes

n/a

## Notes & open questions

none
2026-02-05 14:57:26 +01:00
“ramfox” d5299bf29f chore: Release 2026-01-28 13:33:53 -05:00
9130711599 chore: release prep (#3889)
## Description

final release prep!!!

- update to the latest versions of `iroh-quinn`, `iroh-quinn-udp`,
`iroh-quinn-proto`
- update to the latest version of `netwatch`
- update all deps
- update `rust-version` to 1.89

---------

Co-authored-by: Frando <frando@unbiskant.org>
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
2026-01-28 13:20:15 -05:00
Franz Heinzmann f4bfc9d7b7 examples: improve transfer example (#3873)
## Description

Improves the transfer example we use for dogfooding:

* Change protocol such that the size is client- and not
server-controlled
* Add `--mode` feature on `fetch` side to either download (like
currently), upload, or transfer in both directions
* Add `--duration` feature on `fetch` side to limit by transfer duration
instead of size
* Remove the unordered receive mode. It wasn't used (there was no cli
flag so it was never enabled).
* Add `--output json` to print JSON instead of human-readable text.
* Improve docs

Because the protocol change is wire-breaking the ALPN is updated.

The JSON support was requested @Arqu a couple of time and should make
our integration in netsim easier and less brittle. Output looks like
this atm:

Provide side:
```
{"kind":"EndpointArgs","env":"Staging","relay_url":[],"no_relay":true,"no_discovery":false,"relay_only":false,"pkarr_relay_url":null,"no_pkarr_publish":false,"dns_origin_domain":null,"dns_server":null,"no_dns_resolve":false,"mdns":false,"bind_addr_v4":"127.0.0.1:1234","bind_addr_v4_additional":[],"bind_addr_v6":null,"bind_addr_v6_additional":[],"no_default_bind":false}
{"kind":"EndpointBound","endpoint_id":"5cc1982c0bc2612a2b62e7811242ec317576dace66688af743769e7eebdbb8c7","direct_addresses":["127.0.0.1:1234","[2003:f9:f724:8240:1566:102:9d0d:ea24]:33990","[2003:f9:f724:8240:a6e3:ea7a:0:edb]:33990"],"relay_url":null}
{"kind":"ConnectionAccepted","remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"ConnectionTypeChanged","status":"Selected","addr":{"Ip":"127.0.0.1:47519"},"rtt":2046,"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"HandleRequest","request":{"Download":{"Duration":3000000}},"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"UploadComplete","size":1216070367,"duration":3002590,"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"ConnectionClosed","duration":3002772,"error":null,"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"PathStats","paths":[{"remote_addr":{"Ip":"127.0.0.1:47519"},"rtt":95,"bytes_sent":813274,"bytes_recv":1244335203}],"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
```

Fetch side:
```
{"kind":"EndpointArgs","env":"Staging","relay_url":[],"no_relay":true,"no_discovery":false,"relay_only":false,"pkarr_relay_url":null,"no_pkarr_publish":false,"dns_origin_domain":null,"dns_server":null,"no_dns_resolve":false,"mdns":false,"bind_addr_v4":null,"bind_addr_v4_additional":[],"bind_addr_v6":null,"bind_addr_v6_additional":[],"no_default_bind":false}
{"kind":"SecretGenerated","secret_key":"a0952bebe97106c30d6b22a50402d55d894b8e5e3d5b63d7e643bc5e6ad8f59a"}
{"kind":"EndpointBound","endpoint_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed","direct_addresses":["172.16.10.33:47519","[2003:f9:f724:8240:1566:102:9d0d:ea24]:45524","[2003:f9:f724:8240:a6e3:ea7a:0:edb]:45524"],"relay_url":null}
{"kind":"Connected","remote_id":"5cc1982c0bc2612a2b62e7811242ec317576dace66688af743769e7eebdbb8c7","duration":3820}
{"kind":"StartRequest","mode":"Download","length":{"Duration":3000000}}
{"kind":"ConnectionTypeChanged","status":"Selected","addr":{"Ip":"127.0.0.1:1234"},"rtt":1162}
{"kind":"DownloadComplete","size":1216070367,"time_to_first_byte":5699,"num_chunks":31134,"duration":3004047}
{"kind":"ConnectionClosed","duration":3007952,"error":null}
{"kind":"EndpointClosed","duration":81556,"timed_out":false}
{"kind":"PathStats","paths":[{"remote_addr":{"Ip":"127.0.0.1:1234"},"rtt":84,"bytes_sent":1244335156,"bytes_recv":956724}]}
```

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

This will likely break netsim.

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2026-01-27 21:26:46 +00:00
ramfoxand“ramfox” 6ad5ac4238 chore!: rename Discovery to AddressLookup (#3853)
## Description

rename `Discovery` to `AddressLookup`

## Breaking Changes

- `iroh`
   - `changed`
      - `discovery` -> `address_lookup`
      - `Discovery` -> `AddressLookup`
      - `Endpoint::discovery` -> `Endpoint::address_lookup`
- `endpoint::Builder::set_user_data_for_discovery` ->
`endpoint::Builder::set_user_data_for_address_lookup`
- `endpoint::Builder::discovery` -> `endpoint::Builder::address_lookup`
      - `MdnsDiscovery` -> `MdnsAddressLookup`
      - `DhtDiscovery` -> `DhtAddressLookup`
      - `StaticDiscovery` -> `MemoryLookup`
      - `DynIntoDiscovery` -> `DynIntoAddressLookup`
      - `IntoDiscovery` -> `IntoAddressLookup`
      - `DnsDiscovery` -> `DnsAddressLookup`
      - `DiscoveryError` -> `AddressLookupError`
      - `IntoDiscoveryError` -> `IntoAddressLookupError`
      - `DiscoveryItem` -> `AddressLookupItem`
      - `ConcurrentDiscovery` -> `ConcurrentAddressLookup`
      - features renamed:
          - `discovery-local-network` -> `mdns`
          - `discovery-pkarr-dht` -> `address-lookup-pkar-dht`

## Notes & open questions

~~Very much open to changing some of these from `XEndpointIdResolution`
to `XEir` and `_endpoint_id_resolution` to `_eir`, but wasn't sure if
that would be too confusing. Sometimes it's nice to be explicit, even if
the name is long.~~
We've had many discussions and settled on `AddressLookup` as the proper
name

---------

Co-authored-by: “ramfox” <“kasey@n0.computer”>
2026-01-21 18:03:29 +00:00
e25c5da002 feat: update to released iroh-quinn (#3834)
## Description

- depends on the latest `iroh-quinn` releases
- adds back `remote_id` methods for `IncomingZeroRttConnection` and
`OutgoingZeroRttConnection`
- adds convenience method `ConnectionInfo::selected_path` to ease the
transition from removing `Endpoint::latency`

---------

Co-authored-by: “ramfox” <“kasey@n0.computer”>
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
2026-01-09 10:39:08 +00:00