Repository navigation
Multipath: dial fallback, fixed-rate paths, in-order delivery - #8
Merged
Merged
Conversation
For a dedicated link A with a lower-quality overflow link B: - Dial fallback: if the primary path does not answer the handshake within 3 s, try the extra paths' proxy addresses (priority order, paths without @LOCAL_IP to another remote), so the tunnel comes up while A is down; A then joins as an ordinary path. - Fixed-rate paths: --path .../rate=RATE and --primary-rate send on a path at a fixed rate (cc::FixedRate via noq's new per-path controller) instead of under BBRv3, whose probing and ProbeRTT dips moved traffic onto B. Its window (2 RTTs at the rate) still fills within a round trip when the link dies, so failover is unchanged. The client announces the rate (FRAME_PATH_RATE) and the proxy applies it up to --max-path-rate (off by default: such paths have no congestion control). - In-order delivery (--in-order-delivery, default on): flows that negotiate the rapidmasque-sequence header carry 4-byte sequence numbers (HTTP datagram context 2) and the receiver resequences them with a self-tuning hold time (reorder.rs), so TCP inside WireGuard does not see the reordering of spilled traffic as loss. Other MASQUE peers keep plain RFC 9298 datagrams. The default minimum MTU grows by the 4 bytes to 1356. noq is pinned to the per-path congestion controller branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012baC35vUbLPPhuK4pz4uRz
losfair/noq#5 merged as 38d92aa on dev (same tree as the pinned PR head 21d76fb). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012baC35vUbLPPhuK4pz4uRz
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
This fixes the three gaps in the "dedicated link A, overflow link B" setup:
/priority=1.1. Dial fallback (A down at connect time)
/backuplast.@LOCAL_IPand with a remote other than the primary's. A handshake can't pick its source address, and the path it creates mustn't be confused with another configured path.2. Fixed-rate paths (BBRv3 probing on a dedicated link)
--path .../rate=RATEand--primary-rate RATE(e.g.48M) send on a path at a fixed rate withcc::FixedRateinstead of BBRv3. This uses noq's new per-path controller (feat: per-path congestion controller, kept with the priority across migrations noq#5).FRAME_PATH_RATE("rmpf").--max-path-rate, capping larger requests./statsshowsfixed_rate_bpsper path.3. In-order delivery (reordering when traffic spills from A to B)
rapidmasque-sequence: ?1request header, and a rapidmasque proxy echoes it.src/reorder.rs):--in-order-delivery falseturns it off on the client.WIREGUARD_1280_DATAGRAM, so the default minimum MTU grows to 1356.Depends on
losfair/noq#5 (merged). noq is pinned to
38d92aaondev.Testing
cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo test(71 tests) pass. Full runs were repeated, because the in-order test was timing-sensitive under load; see below.New tests:
handshake_falls_back_to_an_extra_path: the primary proxy address is a black hole, and the tunnel comes up over the extra path. Without the fallback it fails.fixed_rate_path_applies_on_both_ends_up_to_the_proxy_cap:--primary-rate 8Mgives its path the fixed-rate window.--max-path-rate 4M, caps its side to 4M./stats(fixed_rate_bpsandcwnd).in_order_delivery_undoes_reordering:🤖 Generated with Claude Code
https://claude.ai/code/session_012baC35vUbLPPhuK4pz4uRz