Replace the home-relay watchdog with in-place relay failover (flexaccess-iroh v0.0.8) - #62
Merged
Merged
Conversation
…ess-iroh v0.0.8) Adopt flexaccess-iroh v0.0.8. The watchdog (a 60 s network_change() nudge that is a no-op on a stable host and a 180 s endpoint rebuild that dropped every connection) is gone; `VpnServer::run` runs `relay_failover::fail_over_home_relay` alongside its accept loop: after 60 s without a connected home relay the wedged relay is taken out of the relay map so iroh's forced net report homes the endpoint on another configured relay in place, and the relay is put back once a probe shows it connectable. v0.0.8 also binds the endpoint without the custom relays that fail the startup probe (a relay that answers probes but refuses relay connections would otherwise be preferred, never connect, and keep the process from ever coming online); `create_server_endpoint` returns `CreatedEndpoint` and the server hands `relays_left_out` to the failover to restore. The client keeps such a relay out for its session. Consequences for ezvpn: - custom relays (`relay_urls` / `--relay-url`) require at least two distinct URLs; default relay mode is unchanged - the endpoint watch channel that let the TUN reader and the status socket follow a rebuilt endpoint is gone: the endpoint is bound once for the life of `run`, so the self-encapsulation port filter is read once - `server_rebuild_factory`, `EndpointFactory` and the rebuild deadline escalation are removed Docs point at iroh-common-architecture's relay-failover.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8
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.
Summary
flexaccess-irohv0.0.3 → v0.0.8. The watchdog (60 snetwork_change()nudge, a no-op on a stable host, then a 180 s endpoint rebuild that dropped every connection) is replaced by the crate's in-place failover: after 60 s without a connected home relay the wedged relay is taken out of the relay map, iroh's forced net report homes the endpoint on another configured relay, and nothing is torn down. The relay is put back once a probe shows it connectable.VpnServer::runtakes the relay config and the relays left out and hands them to the failover to restore.run.Test plan
cargo clippy --all-targets -- -D warningscargo test(201 + 5 + 3 passed)🤖 Generated with Claude Code
https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8