Skip to content

e2e: the stand of the relay leg automaton (#69) - #93

Merged
limeflash merged 1 commit into
mainfrom
test/relay-leg-stand
Dec 2, 2026
Merged

limeflash merged 1 commit into
mainfrom
test/relay-leg-stand

Conversation

@limeflash

Copy link
Copy Markdown
Collaborator

A stand for the relay leg automaton (#69, step 2): scripts/e2e/relay-leg.sh. Only the script is added, the product is not changed.

It runs in its own unshare -n -m namespaces like bridge.sh (panel, an entry, two exits, a filter that drops IPv4 or IPv6 per relay with nft, a client; documentation address ranges only). Run from WSL: bash scripts/e2e/relay-leg.sh [--long].

Covered (two fast runs in a row, 72 PASS, 0 FAIL, about 14.5 min; one --long run, 76 PASS, 41 min):

  • healthy IPv4: no proposal, the other family is not probed;
  • IPv4 dead, IPv6 alive: an ipv4 -> ipv6 proposal appears, nothing moves in suggest; after accept the relay goes pending -> active on IPv6, the leg and path checks pass, client traffic flows, the capture on the filter shows IPv6 only;
  • both families dead: a problem but no proposal (no_target); relays pinned to ipv4/ipv6 are left alone;
  • IPv4 back: the proposal goes stale; reject snoozes it;
  • rollback: the new leg fails its check, the applier returns the relay to IPv4, the proposal fails and is not repeated;
  • --long: mode auto moves the relay by itself after the two probes.

Not covered: leg_return (the 6 h hold has no time seam; only the IPv4 probe while on IPv6 and no early proposal are checked), accepting through MCP (the admin API is used), TCP relays behind the bridge (bridge.sh).

🤖 Generated with Claude Code

scripts/e2e/relay-leg.sh builds one panel, an entry and two exits in
private network namespaces (documentation and RFC 1918 ranges only),
with IPv4 and IPv6 on the entry-exit links and a filter in between that
drops either family per relay on demand. It runs Hysteria2 UDP relays
and covers the proposal, accept, reject, stale, rollback and
pinned-leg cases of the relay_leg automaton; --long adds a lane for
mode auto.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@limeflash
limeflash merged commit fb68bea into main Dec 2, 2026
10 checks passed
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