You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
decdn fetch/probe: source iroh relay URLs from config, not a CLI flag #935
The client-side one-shot commands (decdn fetch, #391; decdn probe) take --relay-url as a per-invocation flag. The relay set is environment configuration, not a per-call decision — it should come from the config file, with the flag (if kept) demoted to an override.
Context
The config schema already models this: relay_urls: Option<Vec<String>> (with a deprecated single-relay_url alias), resolved into ResolvedConfig.relay_urls: Vec<String> — empty means "n0 default relays", non-empty swaps in self-hosted relays via RelayMode::Custom. The node already consumes it (crates/common/src/config/{types,resolved}.rs).
The client commands don't: probe and the new fetch build RelayMode from the --relay-url flag alone and never read config.
Proposal
decdn fetch and decdn probe load relay_urls from the resolved config (honoring the global --config), building RelayMode::Custom from the list (or Disabled / n0-default when empty), mirroring the node.
Keep --relay-url only as an optional override (or drop it — TBD), and drop it from the required --addr | --relay-url ArgGroup once config can supply the relay.
Multiple relays already work in config; this issue is just making the client commands consume them.
Out of scope
Client-side multi-relay failover/health policy (the node already warns-and-continues; revisit only if clients need more).
Closing as already implemented. The client one-shot commands now source relay URLs from config exactly as proposed here — delivered by #938 (standalone decdn fetch + config-sourced relays, commit b842846) with the client-discovery follow-up #936.
Acceptance points verified against the current tree:
Proposal point
Evidence
fetch + probe load relay_urls from resolved config, honoring --config
crates/cli/src/commands/client_endpoint.rsresolve_relays(flag, config_path); called by probe.rs and fetch.rs
RelayMode::Custom from the list, disabled/n0-default when empty
client_endpoint.rsrelay_mode() + endpoint builder
Deprecated singular relay_url folded into the list
Dropped from the required --addr | --relay-url ArgGroup
crates/common/src/cli/probe.rs / fetch.rs: relay presence is "validated at runtime rather than by a clap ArgGroup, because the relay can also come from config (#935)"
cargo build -p decdn-cli and cargo nextest run -p decdn-cli -p decdn-common pass. No remaining work.
Activity
feat(cli): add decdn fetch with config-sourced relays
feat(cli): add decdn fetch with config-sourced relays
feat(cli): standalone client fetch (decdn fetch) + config-sourced rel…
thiras commentedon Jun 20, 2026
Closing as already implemented. The client one-shot commands now source relay URLs from config exactly as proposed here — delivered by #938 (standalone
decdn fetch+ config-sourced relays, commitb842846) with the client-discovery follow-up #936.Acceptance points verified against the current tree:
fetch+probeloadrelay_urlsfrom resolved config, honoring--configcrates/cli/src/commands/client_endpoint.rsresolve_relays(flag, config_path); called byprobe.rsandfetch.rsRelayMode::Customfrom the list, disabled/n0-default when emptyclient_endpoint.rsrelay_mode()+ endpoint builderrelay_urlfolded into the listclient_endpoint.rs(net.relay_urlselsenet.relay_url.into_iter().collect())--relay-urldemoted to optional overridecrates/common/src/cli/{probe,fetch}.rs—relay_url: Option<String>--addr | --relay-urlArgGroupcrates/common/src/cli/probe.rs/fetch.rs: relay presence is "validated at runtime rather than by a clapArgGroup, because the relay can also come from config (#935)"cargo build -p decdn-cliandcargo nextest run -p decdn-cli -p decdn-commonpass. No remaining work.