Repository navigation
fix(browser): wire hardened TunnelProxy to engine remote proxy isolation - #302
Merged
Merged
Conversation
…hed servers and block check_cdp contextId/userGesture
…& pinned contextId, fix wait deadline spin, and bound payloads/cancel
…te-dual-route-cdp # Conflicts: # apps/desktop/src/surfaces/browser/mod.rs # crates/browser-pane/src/protocol.rs
…ools/fix-rpc-auth-bounds
…wser agent RPC inventory and tab resolution
… proxy to SetPartitionProxy, and add BuiltinPromptGate
…ow sticky suppression, and harden CdpCall/check_cdp
…ools/fix-rpc-auth-bounds # Conflicts: # crates/opencode-kit/src/client/browser_rpc/machine.rs
…pinned context/256-frame overflow, recheck post-capture auth, and fix OOPIF/cancel/bounds
…ix-tunnel-proxy-wiring
… stay under 800-line ceiling
…nelProxy concurrency cap
…mic tunnel rotation/suspend, host proxy validation, and Luau loopback_host
…te-dual-route-cdp # Conflicts: # apps/browser-engine/src/engine.rs
… 800-line ceiling
…ools/fix-rpc-auth-bounds # Conflicts: # apps/browser-engine/src/engine.rs # apps/browser-engine/src/handlers.rs # apps/browser-engine/src/wire.rs # crates/browser-pane/src/client.rs # crates/browser-pane/src/machine.rs # crates/browser-pane/src/protocol.rs
…ledger.rs to stay under 1500-line ceiling
…ix-tunnel-proxy-wiring # Conflicts: # apps/browser-engine/src/context.rs # crates/browser-policy/src/lib.rs
…ix-tunnel-proxy-wiring
…irectional EOF path
…Blocked::Replaced suppressed
…te-dual-route-cdp # Conflicts: # apps/desktop/src/surfaces/browser/mod.rs # crates/browser-pane/src/client.rs # crates/browser-pane/src/protocol.rs
…te-dual-route-cdp
…egacy MCP until Unsupported/Unavailable, and fix #292 merge regressions
…ools/fix-rpc-auth-bounds # Conflicts: # apps/browser-engine/src/downloads.rs # apps/browser-engine/src/engine.rs # apps/browser-engine/src/main.rs # crates/browser-pane/src/find.rs
…te-dual-route-cdp
…ools/fix-rpc-auth-bounds # Conflicts: # apps/browser-engine/src/engine.rs # apps/browser-engine/src/handlers.rs # apps/browser-engine/src/wire.rs # apps/desktop/src/surfaces/browser/rpc/mod.rs
…te-dual-route-cdp # Conflicts: # apps/desktop/src/plugin_host/native/browser/scope.rs # crates/browser-pane/src/client.rs
… subframe enumeration, WHATWG target URL, required contextId, bounded CdpResponse IPC)
…ools/fix-rpc-auth-bounds # Conflicts: # apps/desktop/src/surfaces/browser/rpc/exec/nav.rs # apps/desktop/src/surfaces/browser/rpc/mod.rs
…e.getFrameTree stubs and fix BrowserRpcState field visibility
…ix-tunnel-proxy-wiring # Conflicts: # apps/browser-engine/src/context.rs # apps/desktop/src/surfaces/browser/mod.rs # apps/desktop/src/surfaces/browser/rpc/mod.rs # crates/browser-pane/src/client.rs # crates/browser-pane/src/find.rs # crates/browser-policy/src/lib.rs # plugins/browser/init.luau
…d port complete BuiltinPromptGate
…auth-bounds # Conflicts: # apps/desktop/src/surfaces/browser/rpc/mod.rs # crates/opencode-kit/src/client/browser_rpc/machine.rs
…ix-tunnel-proxy-wiring
…meTree, remove dup flush, depth-1 CDP scan
…auth-bounds # Conflicts: # apps/desktop/src/surfaces/browser/rpc/exec/nav.rs
…ix-tunnel-proxy-wiring # Conflicts: # apps/desktop/src/surfaces/browser/rpc/exec/nav.rs
… unauth pool isolation
…ds and drop >16 MiB CDP events pre-parse
…ix-tunnel-proxy-wiring
…nauth pool with 3s head deadline + 1s watchdog margin
…ix-tunnel-proxy-wiring
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…P-143 (#318) - Fold confirmed merged PRs #307 (a1e7d0d, click-to-load reply videos), #306 (b5167f7, atomic agent_driven), #301 (6522f11, routed-session attach + recency closing #287 regression), #296 (95cb36a, legacy rune_mcp suppression + Half::is_builtin + check_cdp), #303 (6fb05ce, oc-preview:// app routing + raw file:// ban completing UP-095-PREVIEWS), and #316 (6e98fc2, Rune 7a707454 / #1307 strict local video opening) - Add missing browser follow-up rows UP-095-3P-CONTRACT (#296 narrow third-party plugin browser contract gap) and UP-095-PROMPT-GATE (new-session-start-only prompt gate split from #302) - Record #302 split (tunnel vs gate), #314 masking stream paused pending owner decision on agent-tab contexts, and updated browser Reviewed entries - Audit upstream anomalyco/opencode 4122af0206..b9a60d9d07 (+11 commits: 3 skipped, 8 added UP-136..UP-143)
…to cdp_ledger.rs
…ter verbatim move
…ix-tunnel-proxy-wiring
…el-proxy-wiring # Conflicts: # apps/desktop/src/surfaces/browser/rpc/exec/nav.rs # apps/desktop/src/surfaces/browser/rpc/mod.rs # apps/desktop/src/surfaces/browser/rpc/session.rs
|
PR test build retired — merged into |
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
Closes
notes/review-rd-tools.mdFinding 5, all 4 engine-reader#292tunnel conditions, all 4 Round-1 tunnel findings, the Round-2 post-EOF/pool finding, and both Round-3 findings (no idle kill on established authenticated tunnels/streams + 64-slot separate unauthenticated pool with 3 s head deadline and 1 s watchdog margin), stacked on#298(overdev00d73a6d, incl.#305,#316,#303).Tunnel only: Zero prompt-gate changes (the minimal fail-open new-session-start-only gate PR follows separately after
#298and#302merge).1. Round-4 Fixes (
notes/review-rd-tools.md:768-793)tunnel_proxy.rs,tunnel_pump.rs):proxy.ts:promote_authenticated()clearsTrackedClient.deadline = Noneso slow remotehttp://dev-server responses,http://SSE streams (EventSource), quietCONNECT(https:///wss://) tunnels, and quiet WebSockets are never killed for being idle.3 stotal-head deadline on pre-auth connections;~2 sactive watchdog reclaim (POST_EOF_DRAIN_TIMEOUTviaShutdown::Both+ per-connection abort +500 mspoll slice) after remotechunk.eoffor both stalledPOSTbodies and half-openCONNECT/WS clients; and immediate0 msdrop of all connections on suspension (on_sse_disconnected), rotation, or proxy close.proxy.ts): A stalled authenticated socket holds one of the 64 authenticated tunnel slots until either the remote server or the browser closes it (or suspension/rotation tears down the proxy).tunnel_proxy.rs):MAX_UNAUTH_CONNS = MAX_TUNNELS(64), completely separate fromMAX_CONCURRENT_CONNS = MAX_TUNNELS(64), so filling unauthenticated slots is no easier than before and never consumes authenticated tunnel slots.HEADER_TIMEOUT = 3 sensures rapid recovery (CEF sendsCONNECT/HTTP head + credentials on loopback in< 5 ms), andWATCHDOG_HEAD_MARGIN = 1 s(4 swatchdog deadline) guaranteesread_http_headfinishes writingHTTP/1.1 408 Request Timeoutcleanly before the watchdog callsShutdown::Both.2. Confirmed Tunnel Security Guarantees Preserved
experimental.browser/tunnel.{open,read,write,close}wired to#292'sset_partition_proxy; zero local loopback/IMDS/LAN hits;require_remote_proxy_if_remotefail-closed navigation guard;browser.proxy.requiredCDP bootstrap retry.127.0.0.1:0with WindowsSO_EXCLUSIVEADDRUSE), fresh 384-bit OS-CSPRNG credentials per proxy, full-widthusizeconstant_time_eq,407auth + hop-by-hop/auth header stripping,GET+HTTP/1.1+ 0-CL + no-pipelining + wait-for-101WebSocket anti-smuggling, no-pipeliningCONNECT, unbracketed IPv6 rejection, and immediateon_sse_disconnected->suspend_server_tunnels(503+0 mssocket drop +set_partition_proxy(None)).3. Security Scope
TunnelProxyto#292'sset_partition_proxy; zerocontract.jsongrowth, zeroENGINE_REVISIONbump, zerostruct Appfield growth).BrowserRpcFeatureonly; never exposed to web pages or Luau plugins.4. Driven Verification (50/50 Live PASS)
proof/browser-tools/fix-c/idle-10min-probe.json, 2/2 PASS,idleElapsedSeconds: 605):http_sse_survives_10min_idle: true(data: sse-after-10min\n\ndelivered after 605 s completely silent).quiet_websocket_survives_10min_idle: true(PING-AFTER-10MIN->PONG-AFTER-10MINafter 605 s completely silent, zero early closes).TunnelProxysecurity probe (proof/browser-tools/fix-c/proxy-probe.json, 26/26 PASS):slowloris_total_head_deadline_enforced_408: true(HTTP/1.1 408 Request Timeoutcleanly written at~3.0 sbefore the +1 s watchdog margin).unauth_64_flood_recovers_within_head_deadline: true(64 idle unauth sockets held -> 65th unauth503, existing auth WS live, new real authenticated HTTP request succeeds at~3.1 s).stalled_post_body_post_eof_reclaims_slot: true(~2.5 s),half_open_connect_post_eof_reclaims_slot: true(~2.5 s),concurrency_cap_65th_gets_503: true(64 real authenticated CONNECT/WS tunnels -> 65th gets503),windows_so_exclusiveaddruse_blocks_cobind: true,constant_time_eq_256byte_diff_rejected_407: true,ws_http10_refused_400: true,unbracketed_ipv6_url_refused_400: true,ws_rejected_non101_forbids_client_smuggling: true,upgraded_ws_severed_on_suspend/close: true(0 ms).opencode-desktop.exe+ CEF 156 proof (proof/browser-tools/fix-c/summary.json, 22/22 PASS on merged head): Remote confinement (0local victim hits across loopback/IMDS/LAN/CONNECT/WebSocket),Proxy-Authorization/Transfer-Encodingstripped, rotation binds new port & closes old + drops upgraded WebSocket,sse_drop_suspends_remote_tunnel_immediately: true(HTTP/1.1 503+ livews2dropped whileattachheld), and engine fail-closed checks.5/5(tunnel_proxy.rs697 / 800,tunnel_pump.rs224 / 800),web.ps1 -Check, Apple & Linuxbrowser-policyviatools/cargo.ps1,--workspace --all-targets, desktop build: ALL PASS (0 warnings).Held unmerged for READER-10 fourth read.