Obscura is an open-source headless browser engine written in Rust, positioned as a headless browser for AI agents and web scraping. The project uses the Apache-2.0 license, and the official emphasis is that the open-source engine is fully featured and does not impose functional limitations.
Purpose Obscura is mainly used for web scraping and AI agent automation. It is implemented through the Chrome DevTools Protocol (CDP) and can serve as a replacement for headless Chrome, compatible with Puppeteer and Playwright. It directly embeds the V8 engine to run real JavaScript and supports native rendering without Chromium.
Main capabilities
- Native rendering: can take screenshots, record screencasts of live pages, and export PDFs directly.
- Compatibility: implements the Chrome DevTools Protocol, supports Puppeteer and Playwright; provides an MCP (Model Context Protocol) server that exposes browser automation tools to AI agents (such as Claude Desktop, Cursor, etc.).
- Stealth mode: enabled at build time with --features render,stealth, and at runtime with the global --stealth flag. The stealth build includes the full rendering engine, and enabling stealth does not remove screenshot, screencast, PDF, CDP, or MCP functionality.
- Anti-fingerprinting: randomizes fingerprints per session (GPU, screen, canvas, audio, battery); provides realistic navigator.userAgentData (Chrome 145, high entropy values); dispatched events have event.isTrusted = true; hides internal properties (Object.keys(window) safe); native function masking (Function.prototype.toString() → [native code]); navigator.webdriver = undefined (consistent with real Chrome).
- Tracker blocking: blocks 3,520 domains, preventing analytics, advertising, telemetry, and fingerprinting scripts from loading, automatically enabled with --stealth.
- Parallel scraping: provides the obscura scrape command, using worker processes andscrapes multiple URLs; in multi-worker mode, exited child processes are reclaimed and restarted, new connections use only ready workers, and if there are no ready workers the load balancer returns HTTP 503.
- Resource streaming: large resources can be read in chunks via Fetch.takeResponseBodyAsStream with IO.read / IO.close; response bodies exceeding the cache limit (OBSCURA_NETWORK_BODY_BUFFER_BYTES, default 2 MiB) are not retained, and this limit should be increased when streaming large file downloads.
- V8 flags: --v8-flags can be used to pass raw flags to V8, with the same syntax as Chromium's --js-flags and Node command-line flags, commonly used to raise the heap limit to resolve insufficient JS heap memory.
- Timeout control: the default budget for the page script execution phase is 30 seconds, adjustable with OBSCURA_SCRIPT_DEADLINE_MS; modules that enhance already-rendered pages have an independent per-module budget of 3 seconds; OBSCURA_FETCH_TIMEOUT_MS controls the module's network requests rather than evaluation time.
Usage
- Obtaining the binary: download the latest binary from Releases, no Chrome, Node.js, or dependencies required. The release archive contains obscura and obscura-worker, and the parallel scraping command requires both to be placed in the same directory. Linux release builds target Ubuntu 22.04 and can be used on common LTS servers with glibc 2.35+.
- Docker: the image is on Docker Hub, built in multiple stages based on distroless/cc:nonroot, with no shell and no package manager, running as uid 65532, approximately 57 MB compressed. The mounted --storage-dir must be writable by uid 65532. When publishing to the host loopback address, -p 9222:9222 exposes the port on all interfaces.
- Building from source: requires Rust 1.75+ (rustup.rs). The first build takes about 5 minutes (V8 is compiled from source, then cached). The stealth build also compiles BoringSSL and generates bindings, so it requires CMake, Clang, and libclang/LLVM development library. Render builds use rustls; render plus stealth builds use wreq/BoringSSL, so the additional build tools listed above are required.
- Start CDP server: can start a CDP WebSocket server.
- Command line: obscura fetch <URL> fetches and renders a single page; obscura scrape <URL...> uses worker processes to fetch multiple URLs in parallel.
- MCP server: provides two transport modes, stdio (default, suitable for clients such as Claude Desktop that launch a subprocess) and HTTP (suitable for clients connecting over the network), and supports optional flags. The MCP server exposes static image and PDF output; when the streaming Page.startScreencast protocol is needed, CDP should be used.
- Hermes agent plugin: can run Hermes agent browser tasks on Obscura. The plugin starts obscura serve per session (or connects to an already running server) and drives it via CDP, with optional --stealth.
Use cases Suitable for web scraping, AI agent browser automation, scenarios requiring Puppeteer/Playwright compatibility, and collection tasks requiring stealth and anti-fingerprinting, and tracker blocking.
Limitations The official description states that the current implementation covers the block, inline, flex, grid, table, float, positioning, overflow, transform, text, image, SVG, canvas, background, border, and animation paths, but it is still an independently evolving engine: long-tail CSS, some Web APIs, media playback, compositor effects, and platform font rasterization may differ from Chromium. The Puppeteer, Playwright, and MCP guides explain their respective capture APIs and limitations.
Other information Officially, a hosted version of Obscura Cloud is under development, providing hosted infrastructure, residential proxies, and dedicated support; you can join the waitlist or book a demo. The open-source engine remains Apache-2.0 and feature-complete. The project is supported by organizations that support independent open-source browser infrastructure; for sponsorship, contact hello@obscura.sh. The full benchmark suite (WPT conformance, obstacle course, real-world corpus, and speed comparison with Chrome) is located in a separate repository https://github.com/h4ckf0r0day/obscura-benchmark。环境变量完整允许/拒绝规则(含 DNS resolution check) see docs/Environment-variables.md.