Repository navigation
Feature request: configurable paths and ports for daemon, Chrome CDP and stream server (for OS-sandboxed use) #2366
ro-hansolo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We run agent-browser (v0.41.1) inside an OS sandbox (macOS Seatbelt, Windows filtering) that allows only listed loopback ports and one socket folder. Today some of the locations agent-browser picks cannot be set from outside, so we cannot stay inside the allowed set. Here is what we checked in the v0.41.1 source (tag v0.41.1, commit 5868f7c).
Already available:
AGENT_BROWSER_SOCKET_DIR(cli/src/connection.rs:103-106). It uses an existing folder as-is (no chmod), which is what we need.Missing:
Windows daemon port. The daemon port is derived from the session name,
49152 + hash % 16383(cli/src/connection.rs:411-431). There is no env var or flag to set it. If that port is taken, the daemon silently falls back to an OS-assigned ephemeral port (cli/src/native/daemon.rs:364-372), which a sandbox cannot allow in advance.Chrome's remote-debugging (CDP) port. Chrome is always started with
--remote-debugging-port=0(cli/src/native/cdp/chrome.rs:467), and the port is read back fromDevToolsActivePortin the profile directory (chrome.rs:946-968). There is no option to choose the port.Stream server port.
AGENT_BROWSER_STREAM_PORTexists (cli/src/native/daemon.rs:110), so this is already available. However, when that port is taken the server falls back to an ephemeral port (cli/src/native/stream/mod.rs:318-322, called withallow_port_fallback = truefrom daemon.rs).Requests:
AGENT_BROWSER_DAEMON_PORT.AGENT_BROWSER_CDP_PORTor a passthrough that replaces--remote-debugging-port=0. The port would then be read from the given value, not fromDevToolsActivePort.Related existing issues: #1155 (Unix socket blocked in a sandbox), #1791 and #1796 (
--remote-debugging-port=0on WSL2; #1796 pre-binds a fixed port and is closed), #2136 (Windows derived port taken by another program; it fixes the readiness check but adds no way to set the port).Happy to test a branch on Windows and macOS.
All reactions