Skip to content

Replace the home-relay watchdog with in-place relay failover (flexaccess-iroh v0.0.8) - #62

Merged
andrewchen5678 merged 2 commits into
mainfrom
relay-failover
Sep 5, 2026
Merged

andrewchen5678 merged 2 commits into
mainfrom
relay-failover

Conversation

@andrewchen5678

Copy link
Copy Markdown
Collaborator

Summary

  • flexaccess-iroh v0.0.3 → v0.0.8. The watchdog (60 s network_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.
  • v0.0.8 also binds without the custom relays that fail the startup probe, so a process starting while a relay answers probes but refuses relay connections still comes online; VpnServer::run takes the relay config and the relays left out and hands them to the failover to restore.
  • The endpoint watch channel (TUN reader self-encapsulation filter, status socket) that followed a rebuilt endpoint is gone: the endpoint is bound once for the life of run.
  • Custom relays now require at least two distinct URLs; default relay mode is unchanged. Docs point at iroh-common-architecture/relay-failover.md.
  • Version bump to 0.0.47.

Test plan

  • cargo clippy --all-targets -- -D warnings
  • cargo test (201 + 5 + 3 passed)

🤖 Generated with Claude Code

https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8

Andrew Chen and others added 2 commits September 5, 2026 09:36
…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
@andrewchen5678
andrewchen5678 merged commit b006381 into main Sep 5, 2026
6 checks passed
@andrewchen5678
andrewchen5678 deleted the relay-failover branch September 5, 2026 17:03
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