feat(grouprelay): relay-local relayrtt echo for browser-to-relay RTT #96
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/VS-78-grouprelay-relayrtt-echo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The browser-facing side of the relay pump now sniffs inbound text frames for a
{"ctrlChannel":102938,"type":"relayrtt","time":N}control frame and answers it from the relay process itself: it writes the frame back verbatim to the same browser socket and does NOT forward it to the agent. This lets the SPA (VAPP-51) time the browser-to-relay leg on its own, separate from the agent's existing end-to-endrttecho.Interception is scoped to the browser side only (
is_browser, derived from theauthvsrauthquery param); the agent side of the pump is unchanged, so the agent never seesrelayrtt. Every other frame (binary tunnel data, the agent'srttechoes, and all non-matching text) stays on the opaquepump_until_closedfast path. Therelayrtttype token is deliberately distinct from the agent'srttso a relay answer can never be confused with a device answer, and both legs can be in flight at once.Adds an end-to-end integration test (
relayrtt_echo.rs) that opens a real browser+agent relay pair: it asserts the browser gets itsrelayrttframe echoed back verbatim while the agent side sees nothing, and that ordinary browser frames plus agent-originated frames still flow through untouched.#VS-78
The browser-facing side of the relay pump now sniffs inbound text frames for a `{"ctrlChannel":102938,"type":"relayrtt","time":N}` control frame and answers it from the relay process itself: it writes the frame back verbatim to the same browser socket and does NOT forward it to the agent. This lets the SPA (VAPP-51) time the browser-to-relay leg on its own, separate from the agent's existing end-to-end `rtt` echo. Interception is scoped to the browser side only (`is_browser`, derived from the `auth` vs `rauth` query param); the agent side of the pump is unchanged, so the agent never sees `relayrtt`. Every other frame (binary tunnel data, the agent's `rtt` echoes, and all non-matching text) stays on the opaque `pump_until_closed` fast path. The `relayrtt` type token is deliberately distinct from the agent's `rtt` so a relay answer can never be confused with a device answer, and both legs can be in flight at once. Adds an end-to-end integration test (`relayrtt_echo.rs`) that opens a real browser+agent relay pair: it asserts the browser gets its `relayrtt` frame echoed back verbatim while the agent side sees nothing, and that ordinary browser frames plus agent-originated frames still flow through untouched. #VS-78