Repository navigation
Releases
BrowserX 0.1.0
BrowserX 0.1.0
First public release of BrowserX: a Rust service that supervises local Chromium processes, leases them to automation clients as sessions, keeps the state you ask it to keep, replaces browsers that die, hands a live session from one client to another, and exposes the pool to AI agents through an MCP server. For authorized security research and authorized automation only.
Pre-1.0: configuration keys, the HTTP API, command-line interface and on-disk formats can change between minor versions; every change is listed in the changelog. Source only: build with the pinned toolchain (cargo build --release --locked -p browserx, Rust 1.99.0, Chromium installed separately). No prebuilt binaries, container images or crates.io packages are published. License: AGPL-3.0-only.
Start with the README, then the documentation index. Report vulnerabilities privately (see the security policy).
Added
- Backends. The worker can keep its lease registry in PostgreSQL or MariaDB (
[database], with a requirednodeper worker so workers sharing a database never touch each other's leases) and its sealed snapshots in an S3-compatible object store ([object_store], profilesstandard,edge,self-hostedandcompatible, request signing implemented in-tree); SQLite and the snapshot directory stay the default. The MCP server can share rate limits and call budgets through Valkey or Redis ([cache], falling back to in-memory limits when the cache is unreachable) and copy its audit log to ClickHouse ([analytics]), Kafka or RabbitMQ ([events]) and OpenSearch or Elasticsearch ([search]) with bounded buffers that drop and count instead of slowing a call. Every backend has a namespace (schema, database, key prefix, bucket prefix, topic or exchange prefix, index prefix) so several products can share one set of instances; secrets come from files or the environment only; unsupported combinations are refused when the configuration loads. Integration tests run against real services in throwaway podman containers (ci/run-backend-tests.sh, opt-in CI jobbackends). See Backends and the design page. - Audit export sinks (MCP). Optional copies of the hash-chained audit log to ClickHouse (
[analytics]), Kafka or RabbitMQ ([events]) and OpenSearch or Elasticsearch ([search]): bounded non-blocking queues, batching, bounded retries, per-sink drop counters incapabilities, versioned schemas, namespaced by database, topic prefix, virtual host and exchange prefix, or index prefix. - Doctor checks the lease registry.
browserx doctor --configopens the configured lease registry and reads from it once (PostgreSQL, MariaDB or an existing SQLite file), the same reachability/readyzreports while serving. - Sessions as leases. Durable lease records with an identity, an owner, a time-to-live with renewal, an absolute lifetime cap, an idle timeout, a lifecycle state machine (
queued,allocating,active,idle,recovering,draining,lost,closed) and a fencing generation. Every lease change is a compare-and-swap on the expected generation; a lost swap surfaces asstale_generation. - Controller tokens.
bxt_lease tokens, returned once and stored only as SHA-256 digests, compared in constant time; rotated by handoff. - Snapshot key rotation. One active key seals new snapshots; retired keys (
storage.retired_snapshot_key_files) open older ones. - Explicit persistence contracts.
persistenceisephemeral,snapshotorprofile; there is no boolean "persistent" flag. Snapshots capture cookies, per-originlocalStorageand open page URLs, sealed with AES-256-GCM (metadata bound as associated data), versioned per profile, written atomically with mode0600, pruned tosnapshot_keep. Profile directories are created with mode0700under an exclusive lock. - Attach outcomes. Every attach reports
resumed_same_process,restored_from_profile,restored_from_snapshotorfresh_process. - Recovery. Health monitor with unresponsive strikes, confirmed browser shutdown (graceful close, then process-group termination), relaunch with bounded attempts,
recovery = "none"to end a session instead, and startup reconciliation of leases orphaned by a worker restart. - Handoff. Token rotation with generation increment; relay connections bound to the old token are closed.
- Dedicated and shared isolation. One Chromium process per session, or one browser context per session in a warm shared browser behind a scoped CDP relay that injects the context into
Target.createTarget, filters targets and events and refuses context, browser and system commands. - Scheduler. Bounded FIFO admission queue with a deadline, per-owner quotas,
max_browsers, shared-browser slots, warm pool, retirement by age and by contexts served, reaper and periodic snapshotter. - Egress forwarder. A loopback forwarder per dedicated session: direct dialing with a destination policy that refuses private, loopback, link-local, carrier-grade NAT, multicast, reserved and metadata addresses (with an allow-list), or an upstream
http://,https://,socks5://orsocks5h://proxy with credentials kept out of the browser; plain-HTTP requests are tunnelled so CONNECT-only gateways work;{session}and{generation}username templates. - Launch profiles. Named browser launch configurations (executable, headless, flags, environment); managed flags cannot be overridden.
{persona_seed}in flags expands to a stable per-identity number. - HTTP API.
/v1/sessions(create, list, get, attach, renew, handoff, snapshot, release),/v1/profiles,/v1/launch-profiles, typed JSON errors with stable codes, and the authenticated/cdp/{session}/{token}WebSocket relay. - Operations. Ops listener with
/healthz,/readyzand Prometheus/metrics; graceful shutdown onSIGINTandSIGTERMwith final snapshots. - Command line.
browserx serve,config check,keys new,snapshot-key new,doctorand thesessionclient commands. - Documentation. Design pages (architecture, sessions and leases, persistence, recovery, handoff, isolation and security, egress) and guides (getting started, configuration, API, CLI, CDP clients, upstream proxy, launch profiles, operations).
- Repository. CI with a code-owner authorization gate, linting, hashed public-hygiene checks, secret scanning, dependency policy (
cargo deny) and a CodeQL and security workflow that runs once the repository is public. - AI/LLM-native operation. The positioning is next-generation AI/LLM-native browser pooling, session management, persistence, recovery and handoff for authorized security research: AI agents can watch, drive and explain BrowserX within limits an operator sets. Models advise and act through scoped tools and never authorize; leases, recovery, egress policy and the host-protection relay policy stay deterministic code, with no model in the data path. See AI/LLM-native operation.
- MCP server (
browserx-mcp,browserx mcp). A Model Context Protocol server (revisions2026-07-28,2025-06-18and2025-03-26) over stdio or streamable HTTP (--http, loopback by default, bearer token stored as a SHA-256 digest, constant-time comparison,Origincheck, bodies bounded to 4 MiB). It talks to a worker through the public API and the operations listener. Read-only monitoring tools are always on (health,pool_status,assess,list_sessions,get_session,explain_session,explain_error,list_launch_profiles,list_snapshots,capabilities);sessions,handoff,browse,interactandevaluateare capabilities the operator enables one by one, and a tool that is not enabled is not listed. Includesbrowserx mcp check,browserx mcp token newandbrowserx mcp audit verify. See the MCP server guide andexamples/mcp.toml. - Session tools for agents.
create_session(persistence, isolation, launch profile, profile id, TTL, recovery, a named proxy route from configuration instead of credentials),renew_session,snapshot_session,release_sessionandhandoff_session(both needconfirm: true). The MCP server keeps the lease tokens; sessions it creates are labelledmcp=trueand only controlled sessions can be browsed. - Browsing tools for agents. The MCP server connects to a session's
cdp_urlitself:open_page,page_snapshot(accessibility tree with stable element references that interactions re-resolve and refuse when stale),page_text(readable Markdown),screenshot(PNG, at most 2 MiB), tabs,go_back,go_forward,wait_for,network_logandconsole_log(bounded rings per tab),click,type_text,press_key,select_option,scroll,hoverand, off by default,evaluate_js. When the browser behind a session was recovered, the next call reconnects and says what the recovery outcome means. - Deterministic scope and untrusted content. Navigation is confined to
browse.allowed_originsand an optional engagement window: refused before the request, enforced on every top-level request including redirect hops while the browser is held at the request, and checked again on the final page. All page-derived text is wrapped in<untrusted_page_content origin="...">with the wrapper neutralized inside the text. Lease...