Files
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
..
2026-10-21 13:06:43 -04:00

iroh-base

This crate provides base types and utilities used throughout Iroh.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.