v0.31.0

n0-computer/irohv0.31.0Jan 14, 2025by github-actions[bot]

AI Summary

This release introduces authentication for iroh-relay, makes relay-only mode configurable, and simplifies the Endpoint::close API by making it infallible.

Key Highlights

  • Implemented authentication for iroh-relay.
  • Relay-only mode is now configurable.
  • Endpoint::close future is now infallible.
  • Added regular pings to check relay connections.

Breaking Changes

  • iroh::Endpoint::close future is now infallible instead of returning Result.
  • iroh_relay::server::ClientConnRateLimit renamed to ClientRateLimit.
  • iroh_relay::client::Client completely changed.
  • Removed MaybeTlsStreamServer from public API.
  • Removed SendMessage::NotePreferred.

New Features

  • Implement authentication for iroh-relay.
  • Send regular pings to check the connection.
  • Relay only mode now configurable.
  • Allow dns discovery in transfer example.

Full Release Notes

## โš ๏ธ Breaking Changes

- `iroh`
  - changed
    - `iroh::Endpoint::close`'s future is now infallible, instead of returning a `Result`.
  - removed
    - `regex` feature (as the dependency is not used anymore)
  - added
    - `relay-only` mode for testing
- `iroh-relay`
  - added
    - added: field `access` to `iroh_relay::server::RelayConfig`
  - changed
    - renamed `iroh_relay::server::ClientConnRateLimit` to `ClientRateLimit`
    - iroh_relay::client::Client has completely changed, see the new docs.
  - removed
    - `iroh_relay::server::MaybeTlsStreamServer` from the public API
    - `iroh_relay::client::SendMessage::NotePreferred`

## โ›ฐ๏ธ  Features

- *(iroh)* Implement Discovery for Arc'ed Discovery types ([#3107](https://github.com/n0-computer/iroh/issues/3107)) - ([f675525](https://github.com/n0-computer/iroh/commit/f675525bba5bb70b3723983fe5692652c441351d))
- *(iroh-relay)* [**breaking**] Implement authentication ([#3086](https://github.com/n0-computer/iroh/issues/3086)) - ([2c42eff](https://github.com/n0-computer/iroh/commit/2c42effa0918962e730e92aabd9dde97f887cd70))
- *(iroh-relay)* Send regular pings to check the connection ([#3113](https://github.com/n0-computer/iroh/issues/3113)) - ([cd12da3](https://github.com/n0-computer/iroh/commit/cd12da362bdc58fd37cc71177cc665f3cde4546c))
- *(relay)* [**breaking**] Relay only mode now configurable ([#3056](https://github.com/n0-computer/iroh/issues/3056)) - ([5aba17e](https://github.com/n0-computer/iroh/commit/5aba17efacc348bb658310d184159b77a65df7f2))
- Make `Endpoint::close` infallible ([#3112](https://github.com/n0-computer/iroh/issues/3112)) - ([870c76e](https://github.com/n0-computer/iroh/commit/870c76edebe92fe06effa774c25677da43589351))
- Allow dns discovery in transfer example ([#3121](https://github.com/n0-computer/iroh/issues/3121)) - ([a5bb926](https://github.com/n0-computer/iroh/commit/a5bb9268b26655a5a9c2aa696fc3fbd4c28485ff))

## ๐Ÿ› Bug Fixes

- *(dns)* Segfaults in pkarr ([#3120](https://github.com/n0-computer/iroh/issues/3120)) - ([04d43a6](https://github.com/n0-computer/iroh/commit/04d43a6526e29dc9e149999e2f207512af762127))
- *(iroh)* Set MaybeFuture to None on Poll::Ready ([#3090](https://github.com/n0-computer/iroh/issues/3090)) - ([6599ea6](https://github.com/n0-computer/iroh/commit/6599ea656de5a35be7c866a45c1d9f6ab5392df5))
- *(iroh)* Parse DNS answer with multiple records into a proper `NodeAddr` ([#3104](https://github.com/n0-computer/iroh/issues/3104)) - ([024ab7f](https://github.com/n0-computer/iroh/commit/024ab7f3f958528e183bb0d6489691518a0c40eb))
- *(iroh)* Remove superflious info log ([#3080](https://github.com/n0-computer/iroh/issues/3080)) - ([423a986](https://github.com/n0-computer/iroh/commit/423a9868a7386274dfe335e95622c7486dfeeb4f))
- *(iroh)* Implement Clone for StaticProvider discovery ([#3108](https://github.com/n0-computer/iroh/issues/3108)) - ([65cf688](https://github.com/n0-computer/iroh/commit/65cf6886eca1930b42de043f927a2c2cd5d518cc))
- *(iroh)* Queue sent datagrams longer ([#3129](https://github.com/n0-computer/iroh/issues/3129)) - ([e756710](https://github.com/n0-computer/iroh/commit/e756710b5d1c51b534c3ee280f3392c59420f34d))
- *(iroh)* Return error if disco send via relay fails ([#3130](https://github.com/n0-computer/iroh/issues/3130)) - ([35af23e](https://github.com/n0-computer/iroh/commit/35af23e259d66bde842a0f0b6708415b8562e4e0))
- *(iroh, iroh-relay)* [**breaking**] Optimise the relay datagram path through the MagicSock ([#3062](https://github.com/n0-computer/iroh/issues/3062)) - ([7ad531e](https://github.com/n0-computer/iroh/commit/7ad531ebfb4764861c0197eaf65249c232d23e8d))
- *(iroh-relay)* Removes deadlock in `Clients` ([#3099](https://github.com/n0-computer/iroh/issues/3099)) - ([c650ea8](https://github.com/n0-computer/iroh/commit/c650ea83dae8e25165c9eb9b502d58113c7febc5))
- *(iroh-relay)* Cleanup client connections in all cases ([#3105](https://github.com/n0-computer/iroh/issues/3105)) - ([f08d560](https://github.com/n0-computer/iroh/commit/f08d560669f64ff4b4e88a5e22970edac472b8cc))
- [**breaking**] Cleanup dead and unused dependencies ([#3070](https://github.com/n0-computer/iroh/issues/3070)) - ([a37dcfc](https://github.com/n0-computer/iroh/commit/a37dcfcb7ef4355603fb5192e0753b257f81aa36))
- Correctly set publishing details for pkarr records ([#3082](https://github.com/n0-computer/iroh/issues/3082)) - ([7bdae88](https://github.com/n0-computer/iroh/commit/7bdae88cb38cf312744f355d46223442842810e7))
- Try improving `relay_datagram_send_channel()` ([#3118](https://github.com/n0-computer/iroh/issues/3118)) - ([594b861](https://github.com/n0-computer/iroh/commit/594b86182da2481aa5b6885a38d6c19a16db25df))

## ๐Ÿšœ Refactor

- *(iroh)* Magical pin projections ([#3060](https://github.com/n0-computer/iroh/issues/3060)) - ([a4d4e7d](https://github.com/n0-computer/iroh/commit/a4d4e7de7e0f5506bd48cbcbbb6bafcb342b9557))
- *(iroh)* ActiveRelayActor terminates itself ([#3061](https://github.com/n0-computer/iroh/issues/3061)) - ([693922a](https://github.com/n0-computer/iroh/commit/693922a407e9ed0ed6e2a3c16c4e19ad85582df3))
- *(iroh)* Simplify RTT actor ([#3072](https://github.com/n0-computer/iroh/issues/3072)) - ([1cd0e96](https://github.com/n0-computer/iroh/commit/1cd0e96e849de4c5c920098141a55122d56e18b0))
- *(iroh)* Remove CancellationToken from Endpoint ([#3101](https://github.com/n0-computer/iroh/issues/3101)) - ([9cef520](https://github.com/n0-computer/iroh/commit/9cef5204f6799d8b3f8547e77a9696407e496dfc))
- *(iroh, iroh-relay)* [**breaking**] Do reconnection in ActiveRelayActor ([#3058](https://github.com/n0-computer/iroh/issues/3058)) - ([272b6c4](https://github.com/n0-computer/iroh/commit/272b6c46a5d0cf25eca9db446725514da2a4138e))
- *(iroh-base)* Introduce an `Arc` into `RelayUrl` ([#3065](https://github.com/n0-computer/iroh/issues/3065)) - ([834ab78](https://github.com/n0-computer/iroh/commit/834ab785c192efb1dfad4975a0752c69a0dec68b))
- *(iroh-relay)* Rename DerpCodec to RelayCodec ([#3059](https://github.com/n0-computer/iroh/issues/3059)) - ([dfa0a2c](https://github.com/n0-computer/iroh/commit/dfa0a2c5e321304936e46feb42be0d67dc078a3b))
- *(iroh-relay)* [**breaking**] Server actor task is not a task or actor anymore ([#3093](https://github.com/n0-computer/iroh/issues/3093)) - ([f50db17](https://github.com/n0-computer/iroh/commit/f50db17d2d96ee86f0cf0f67f998dc89b320a09f))

## ๐Ÿ“š Documentation

- *(iroh)* Update discovery docs, mostly StaticProvider ([#3109](https://github.com/n0-computer/iroh/issues/3109)) - ([eb90bfc](https://github.com/n0-computer/iroh/commit/eb90bfc9bc9e9beaf8fd5a32dfb38da49399d729))
- *(iroh-relay)* README.md: config.toml must use [tls] instead of [tlsconfig] ([#3126](https://github.com/n0-computer/iroh/issues/3126)) - ([4e2641d](https://github.com/n0-computer/iroh/commit/4e2641d043a6b1b26918b892a052604d95ea050d))

## ๐Ÿงช Testing

- *(iroh)* Make `test_relay_datagram_queue` less timing dependent ([#3106](https://github.com/n0-computer/iroh/issues/3106)) - ([3fedee9](https://github.com/n0-computer/iroh/commit/3fedee95049b24895e5323a74ac676536420fb7c))
- *(iroh)* Add some context to test errors ([#3066](https://github.com/n0-computer/iroh/issues/3066)) - ([1ae820d](https://github.com/n0-computer/iroh/commit/1ae820d00e5062cf2a709f36d9f913c7cb2ef933))

## โš™๏ธ Miscellaneous Tasks

- *(*)* Run flaky tests with --verbose and use ci profile ([#3063](https://github.com/n0-computer/iroh/issues/3063)) - ([bc4f3ca](https://github.com/n0-computer/iroh/commit/bc4f3cac85bf63a55bea6dfb497dc822d409fe62))
- Pin an older nextest version ([#3088](https://github.com/n0-computer/iroh/issues/3088)) - ([8873190](https://github.com/n0-computer/iroh/commit/88731908276b3acdd1fd79becdb3d329dd5d14e4))
- Add project tracking ([#3094](https://github.com/n0-computer/iroh/issues/3094)) - ([d236e04](https://github.com/n0-computer/iroh/commit/d236e045017becd2dadf86ee0091d7a13d093592))
- Bug Report issue template ([#3085](https://github.com/n0-computer/iroh/issues/3085)) - ([60ba9ac](https://github.com/n0-computer/iroh/commit/60ba9ac75f81f8dcd4c49a5606ae96cc86cdbd3b))
- Use variable to construct URL ([#3122](https://github.com/n0-computer/iroh/issues/3122)) - ([3891778](https://github.com/n0-computer/iroh/commit/3891778af99f373f34c5d684489d06392bf6cd4e))
- Upgrade `portmapper` and `netwatch` deps ([#3127](https://github.com/n0-computer/iroh/issues/3127)) - ([7ba6321](https://github.com/n0-computer/iroh/commit/7ba63218b282641ab2f8065773992362ddaf44c2))