Repository navigation
1.6.0: compress remote output and attach behind the hello - #20
Merged
Merged
Conversation
A device's hello offers LZFSE frame compression and the host turns it on once the proof checks out: each frame of 1 KiB and up is compressed alone, flagged in the header's padding, so a reattach's 256 KiB replay crosses as 30-60 KiB. The link window counts a compressed frame as the plain one it stands for. On a remote link a reattach now leaves right behind the hello and its answer waits for the hello's, saving a round trip; an open still waits, so a hello given up on cannot leave a shell no tab knows. A close asked for while the hello fails now reaches the host over a link of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`remote-lab latency` dials, says hello and attaches a session again and again, phase by phase, with the attach pipelined or not and compression offered or not. The lab offers compression as the app does, and the flood scenario's ACK can no longer be spliced into a write of the flood. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
For 1.6.0, not a patch: it adds a negotiated hello field and a header flag.
What changes
cmpr(LZFSE). The host turns it on for that link only after the device proof checks out.attachSessionright behind the hello. The attach reply is held until the hello's reply and dropped if the hello failed.remote-lab latencytimes each phase of a reattach.Compatibility: an older peer on the 1.5 line simply doesn't offer or doesn't accept, and gets plain frames. A pipelined attach works against the unchanged 1.5.x host. Verified against the released 1.5.2 on a vphone.
Measured
remote-lab latencyreattaches a session with a full 256 KiB replay. Median of 8–15 runs. Paths go throughnetem-proxy.py: wifi = 30 ms RTT at 40 Mbit, cellular = 180 ms RTT at 8 Mbit, awful = 700 ms RTT at 600 kbit.Scenario suite, 46 runs on tart against the 1.5.1 helper and against this branch's: the same pass/fail set on both. The only failures are awful/paste and tunnel/deadzone, which fail identically on 1.5.1. Tunnel and deadzone outlast the 20 s reply limit by design; the profile comments still say 45 s.
App, end to end: vphone app ⇄ tart host through a local relay.
BREACH: on by default (decided)
Per-frame compression stops one frame's size from leaking another frame's contents. It does not cover a single frame that holds both a secret and attacker-chosen text, resent many times while someone watches record sizes. A terminal doesn't resend on its own, so this is judged impractical; compression stays on for every link that offers it, with the residual risk recorded beside
RemoteFrameCompression.Not in this PR (found while testing)
ighostvtd(the proxy) within seconds, and io exits with it. Every session is lost. The released 1.5.2 behaves identically. 5 GB is survived..serviceresolution costs about 5 ms here, so dialing the advertised IPv4 directly was not pursued.Review
Three adversarial review rounds by subagents. Every finding was fixed or documented in the code: BREACH wording, orphan-shell risk, link window counted in wire bytes, scratch allocation, decoder threshold, deferred close on hello failure, deinit leak.
make check,make test(harnesses) andmake deb/make mac-zipall pass.🤖 Generated with Claude Code