Remove the relay watchdog and require the address lookup service with custom relays - #122
Closed
andrewchen5678 wants to merge 2 commits into
Closed
andrewchen5678 wants to merge 2 commits into
andrewchen5678 wants to merge 2 commits into
Conversation
…h v0.0.6) Adopt the shared crate's mandatory lookup service, on top of the watchdog removal already on this branch. Custom relays now come with one self-hosted iroh-dns-server behind a secret-gated reverse proxy; servers publish their relay URL there and clients resolve it, so a server can move to another relay without every client being reconfigured. - `[iroh].lookup_url` / `lookup_secret`, `--lookup-url` / `--lookup-secret`, `TUNNEL_RS_LOOKUP_URL` / `TUNNEL_RS_LOOKUP_SECRET`; both required with `relay_urls` and rejected without, resolved through the crate's `RelayConfig::resolve(RelaySettings)`. - `generate-lookup-secret` (`--json` form too), printing the crate's checksummed `lks1-` secret. - Servers publish in the foreground at startup and fail if rejected; clients never publish. - e2e: `run_e2e.sh` takes `--lookup-url`/`--lookup-secret` or `--local-lookup` (a local iroh-dns-server behind caddy, via `lookup_dev.sh`) and asserts the record is published, readable only through the secret-gated URL, and names a configured relay. `run_relay_failover_e2e.sh` runs the lookup stack and asserts the record is republished naming the survivor after the server's home relay is killed. `run_lookup_cloudflare_e2e.sh` runs the whole thing with the lookup service behind a real Cloudflare quick tunnel. - Docs: README, architecture doc (watchdog section replaced), TOML examples, test-scripts README, AGENTS.md. Verified: cargo clippy, cargo test (72), and all three e2e suites pass (local lookup, relay failover with republish, Cloudflare quick tunnel). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3hEPd7ueTS7hchgGK6Fqf
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
The branch carries two commits:
release-v0.6.3-native-relay): the home-relay watchdog and the server endpoint rebuild are gone; servers keep one endpoint and rely on iroh 1.1 for reconnects and re-homing.iroh-dns-serverbehind a secret-gated reverse proxy; servers publish their relay URL there and clients resolve it, so a server can move to another relay without every client being reconfigured. That publish path is what the watchdog's rebuild-with-the-same-identity was papering over.[iroh].lookup_url/lookup_secret,--lookup-url/--lookup-secret,TUNNEL_RS_LOOKUP_URL/TUNNEL_RS_LOOKUP_SECRET; both required withrelay_urls, rejected without.tunnel-rs generate-lookup-secret(and--json): the crate's checksummedlks1-…secret.Design and deployment recipe: flexaccessdev/iroh-common-architecture#6.
Tests
cargo clippy,cargo test(72 tests).run_e2e.sh --relay-url … --relay-only --local-lookup: local dev relay plus a localiroh-dns-serverbehindcaddygated by a fresh secret (lookup_dev.sh). Asserts the server's record is published, readable only through the secret-gated URL, and names a configured relay. Pass.run_relay_failover_e2e.sh: two relays plus the lookup stack. New assertions: B1 the record names the server's home relay; B2 kills that relay and requires the record to be republished naming the survivor before a client configured with only the survivor reconnects; B4 the record names a live relay after both relays restart. All 9 scenarios pass.run_lookup_cloudflare_e2e.sh(new): the lookup service published through a real Cloudflare quick tunnel (cloudflared tunnel --url), thenrun_e2e.shrelay-only against it. Confirms the gate holds through Cloudflare (secret path 200, ungated path 404) and the record round-trips through the tunnel. Pass.Two things the e2e work caught and that are fixed in the docs PR: the
dns.tomlexample had its top-level keys after table headers and lacked the root origin, and a Caddy site block named by host matches nothing behind Cloudflare (bare port is required).Merge order
flexaccessdev/flexaccess-iroh#5 first (its v0.0.6 is already tagged as a prerelease from the branch, so this builds as is), then this. ezvpn and flextunnel follow separately.
🤖 Generated with Claude Code
https://claude.ai/code/session_01D3hEPd7ueTS7hchgGK6Fqf