Relay-only endpoints, configured relay order, no file loading (v0.0.3) - #3
Merged
Merged
Conversation
…es inline - `EndpointOptions::relay_only` clears the IP transports and adds no address lookup at all (n0 or mDNS), for tunnel-rs's `--relay-only` mode. - `RelayConfig::from_urls_with_token` keeps the configured relay order while deduping (first occurrence wins) instead of sorting: a relay-only dialer tries the relays in that order, so the first URL is the preferred one. - `load_secret_from_string` accepts a whole generated key file (`#` headers and blank lines skipped), so an inline config secret or an environment variable may carry a pasted key file; `load_secret` delegates to it. - `RelayConfig::log_status` marks an authenticated relay set. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wFg6mkqdqfVXBorM2bfm8
…data How key material is read and decoded is not this crate's job: the application owns the path, the file format, the "generate one with ..." hint, and the permissions policy. The crate now takes values only — an `iroh::SecretKey` bound on the builder, `flexaccess_keys` keys for the auth transcript. Removed `load_secret`, `load_secret_from_string`, `secret_to_endpoint_id`, `auth::load_client_key_from_file` and `auth::load_authorized_keys` (client key files come through flexaccess-keys' own loaders). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wFg6mkqdqfVXBorM2bfm8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What tunnel-rs needs to adopt the crate, plus a scope correction:
EndpointOptions::relay_only: clears IP transports and adds no address lookup (n0 or mDNS), so an endpoint is reachable only through the configured relays.RelayConfig::from_urls_with_tokenkeeps the configured relay order while deduping (first occurrence wins) instead of sorting. A relay-only dialer walks the relays in order, so the first URL is the preferred one.RelayConfig::log_statusappends(authenticated)when a relay auth token is set (never the token itself).load_secret,load_secret_from_string,secret_to_endpoint_id,auth::load_client_key_from_file,auth::load_authorized_keys. Applications bind their owniroh::SecretKeyand load client key files throughflexaccess_keysdirectly.Consumers on 0.0.2 add
relay_only: falseto theirEndpointOptionsliteral and bring back their own secret-key file reader.Validation:
cargo clippy --all-targets --all-features -- -D warningsclean,cargo test --all-features23 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_018wFg6mkqdqfVXBorM2bfm8