mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-28 08:01:15 +00:00
<!-- 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>
iroh-base
This crate provides base types and utilities used throughout Iroh.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
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.