Skip to content

Relay-only endpoints, configured relay order, no file loading (v0.0.3) - #3

Merged
andrewchen5678 merged 2 commits into
mainfrom
relay-only-and-key-file-secrets
Sep 4, 2026
Merged

andrewchen5678 merged 2 commits into
mainfrom
relay-only-and-key-file-secrets

Conversation

@andrewchen5678

@andrewchen5678 andrewchen5678 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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_token keeps 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_status appends (authenticated) when a relay auth token is set (never the token itself).
  • No more file loading or secret-key parsing. How key material is read and decoded is the application's job (path, format, error hint, permissions). Removed load_secret, load_secret_from_string, secret_to_endpoint_id, auth::load_client_key_from_file, auth::load_authorized_keys. Applications bind their own iroh::SecretKey and load client key files through flexaccess_keys directly.

Consumers on 0.0.2 add relay_only: false to their EndpointOptions literal and bring back their own secret-key file reader.

Validation: cargo clippy --all-targets --all-features -- -D warnings clean, cargo test --all-features 23 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_018wFg6mkqdqfVXBorM2bfm8

Andrew Chen and others added 2 commits September 4, 2026 08:25
…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
@andrewchen5678 andrewchen5678 changed the title Relay-only endpoints, configured relay order, inline key files (v0.0.3) Relay-only endpoints, configured relay order, no file loading (v0.0.3) Sep 4, 2026
@andrewchen5678
andrewchen5678 merged commit 422dace into main Sep 4, 2026
@andrewchen5678
andrewchen5678 deleted the relay-only-and-key-file-secrets branch September 4, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant