Commit graph

5 commits

Author SHA1 Message Date
Haozhe
ab9e688cd0
feat(remote-control): cache rewritten tunnel responses with ETag validation (#3718)
* feat(remote-control): cache rewritten tunnel responses with ETag validation

* fix(remote-control): weaken tunnel cache etag and drop 304 content-length

* fix(remote-control): restrict tunnel 304 to successful GET/HEAD and honor wildcard If-None-Match
2026-09-11 12:57:14 +08:00
Haozhe
306f6f6925
fix(remote-control): validate tunnel base64 linearly to avoid V8 regexp stack overflow (#3709)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
The Remote Control HTTP tunnel validated each base64 message with a
backtracking regular expression. Requests larger than ~3.5MB (base64
~5MB) exhausted the V8 Irregexp backtracking stack and threw
RangeError, which the catch-all mapped to a 400 with an empty body,
surfacing as a generic connection failure on the web client.

Replace the regex with an O(n) character check, reject oversize
requests from the base64 length before decoding, and map non-SyntaxError
failures to 502 instead of 400.
2026-09-11 11:06:59 +08:00
Haozhe
e409bc8ba5
feat(remote-control): compress textual tunnel responses with gzip (#3707)
* feat(remote-control): compress textual tunnel responses with gzip

* fix(remote-control): honor explicit gzip exclusion over accept-encoding wildcard

* fix(remote-control): skip gzip for 206 responses and vary by accept-encoding

* fix(remote-control): compress tunnel responses off the event loop

* fix(remote-control): vary identity responses and version compressed etags

* fix(remote-control): drop etags from gzipped tunnel responses
2026-09-10 21:39:15 +08:00
Haozhe
369dbff8db
fix(remote-control): release the lock before reporting off and re-read the server token per forward (#3599)
* fix(remote-control): release the lock before reporting off and re-read the server token per forward

* fix(remote-control): pass the token provider through the manager
2026-09-07 14:15:28 +08:00
Haozhe
48f5dc9740
feat(kap-server): add remote-control runtime toggle API (#3594)
* feat(kap-server): add remote-control runtime toggle API

* feat(remote-control): manage tunnel lifecycle with an xstate state machine
2026-09-07 13:46:22 +08:00