Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

obscura

> DevOps
Open source

The headless browser for AI agents and web scraping

19.9K stars0 likes3 views
WebsiteGitHub

About

The headless browser for AI agents and web scraping

Obscura

The open-source headless browser for AI agents and web scraping.
Lightweight, stealthy, and built in Rust.

Native rendering is here. No Chromium required. 🎉

Capture screenshots, screencast live pages, and export PDFs directly with Obscura.


Obscura is a headless browser engine written in Rust, built for web scraping and AI agent automation. It runs real JavaScript via V8, supports the Chrome DevTools Protocol, and acts as a drop-in replacement for headless Chrome with Puppeteer and Playwright.

Why Obscura over headless Chrome?

Metric Obscura Headless Chrome
Memory 30 MB 200+ MB
Binary size 70 MB 300+ MB
Anti-detect Built-in None
Page load 85 ms ~500 ms
Startup Instant ~2s
Puppeteer Yes Yes
Playwright Yes Yes
  </a>
</td>
<td>
  <strong>Obscura inspired Cloudflare Kitesurf’s first prototype</strong>
  <br>
  Cloudflare began by porting Obscura to Workers while developing its
  new agent-first browser.
  <br>
  <a href="https://blog.cloudflare.com/kitesurf/">
    Read Cloudflare’s engineering story →
  </a>
</td>

Obscura Cloud

We are working on Obscura Cloud the hosted version, with managed infrastructure, residential proxies, and dedicated support. For people who want the engine without operating it themselves.

The open-source engine stays Apache-2.0, fully featured. No feature gating, ever.

Get on the waitlist →
📅 Book a demo →

Sponsors

Obscura is supported by organizations helping us build independent open-source browser infrastructure.

Want to sponsor? Email [email protected].

  </a>
</td>
<td valign="middle">
  <a href="https://go.nodemaven.com/obscuraRMaugust" target="_blank"><b>NodeMaven</b></a>: The most efficient proxy provider for Web Scraping and Automation with the Highest Quality IP on the market.<br><br>
  <b>Why <a href="https://go.nodemaven.com/obscuraRMaugust" target="_blank">NodeMaven</a>?</b><br>
  ZIP targeting<br>
  99.9% uptime<br>
  IP filtering: all proxies have fraud score &lt;97%<br>
  No KYC required<br>
  Unique free tools: Proxy Bandwidth Checker, Meta Tag Checker, IP Lookup and others!<br><br>
  🎁 <b>Special codes for Obscura users:</b><br>
  <b>OBSCURA35</b> - 35% off to Mobile and Residential Proxies<br>
  <b>OBSCURA40</b> - 40% off to ISP (Static) Proxies
</td>
  </a>
</td>
<td valign="middle">
  🚀 <b>Obscura × ProxyEmpire</b><br>
  Using Obscura for AI agents, browser automation, or web scraping? Power it with reliable residential and mobile proxies from <a href="https://proxyempire.io/?ref=obscura&utm_source=obscuragithub"><b>ProxyEmpire</b></a>.<br><br>
  <b>🌍 30M+ residential IPs in 170+ countries<br>
  📱 4G/5G mobile proxies<br>
  🔄 Rotating & sticky sessions<br>
  🎯 City, region & ISP targeting<br>
  🔐 HTTP, HTTPS & SOCKS5 support<br><br>
  🎁 Use code <b>OBSCURA35</b> for a <b>35% recurring discount</b>.<br><br></b>
  Better proxies. Fewer blocks. More scalable automation.
</td>
  </a>
</td>
<td valign="middle">
  <a href="https://niuproxy.com/?utm_source=obscura&utm_medium=obscura&ref=obscura"><b>NiuProxy</b></a> Rotating Residential Proxies — Special Offer: 10TB at $0.35/GB | 1TB at $0.50/GB.<br><br>
  🎁 Use code <b>PAY2</b> for <b>10% off</b> your recharge.
</td>

Install

Download

Grab the latest binary from Releases:

…

No Chrome, no Node.js, no dependencies. Release archives include both obscura and obscura-worker; keep them in the same directory for the parallel scrape command.

Archive suffix Rendering Stealth transport
none Yes No
-stealth Yes Yes
-no-render No No
-no-render-stealth No Yes

Linux release builds target Ubuntu 22.04 so the downloaded binary remains usable on common LTS servers with glibc 2.35+.

Docker

bash
docker run -d --name obscura -p 127.0.0.1:9222:9222 h4ckf0r0day/obscura

Image on Docker Hub. Multi-stage build on distroless/cc:nonroot — no shell, no package manager, runs as uid 65532, ~57 MB compressed. A mounted --storage-dir must be writable by uid 65532. Publish to host loopback as above; -p 9222:9222 exposes the port on every interface.

Build from source

bash
git clone https://github.com/h4ckf0r0day/obscura.git
cd obscura

# Rendering
cargo build --release -p obscura-cli --bins --features render

# Rendering and stealth
cargo build --release -p obscura-cli --bins --features render,stealth

# No rendering
cargo build --release -p obscura-cli --bins --no-default-features

# No rendering, with stealth
cargo build --release -p obscura-cli --bins --no-default-features --features stealth

Requires Rust 1.75+ (rustup.rs). First build takes ~5 min (V8 compiles from source, cached after). The stealth build also compiles BoringSSL and generates bindings, so it needs CMake, Clang, and the libclang/LLVM development libraries. On Ubuntu/Debian:

bash
sudo apt-get install build-essential cmake clang libclang-dev llvm-dev

The rendering build uses rustls. The rendering-and-stealth build uses wreq/BoringSSL and therefore needs the additional build tools above.

Quick Start

Fetch a page

…

bash obscura fetch http://127.0.0.1:3000 --allow-private-network --dump text

Works on any subcommand, e.g. the CDP server for local Puppeteer/Playwright:

obscura serve --port 9222 --allow-private-network


See [docs/Environment-variables.md](docs/Environment-variables.md) for the
full allow/deny rules (DNS-resolution-time checks included).

Rendering

Official release archives and the Docker image include the rendering engine. It provides CSS layout and paint, viewport and full-page screenshots, scroll-aware fixed and sticky geometry, activity-driven CDP screencasting, and raster PDF export without starting Chromium.

javascript
await page.setViewport({ width: 1440, height: 1000 });
await page.goto('https://example.com', { waitUntil: 'load' });
await page.screenshot({ path: 'page.png', fullPage: true });
await page.pdf({ path: 'page.pdf', format: 'A4', printBackground: true });

The current implementation covers block, inline, flex, grid, table, float, positioning, overflow, transform, text, image, SVG, canvas, background, border, and animation paths. It remains an evolving independent engine: long-tail CSS, some Web APIs, media playback, compositor effects, and platform font rasterization may differ from Chromium. The existing Puppeteer, Playwright, and MCP guides cover their capture APIs and limits.

Start the CDP server

bash
obscura serve --port 9222

# With stealth mode (anti-detection + tracker blocking)
obscura serve --port 9222 --stealth

Scrape in parallel

bash
obscura scrape url1 url2 url3 ... \
  --concurrency 25 \
  --eval "document.querySelector('h1').textContent" \
  --format json

# Suppress scrape progress on stderr for script-friendly output
obscura scrape https://example.com --quiet --format json

# Scrape workers inherit the global proxy
obscura --proxy http://127.0.0.1:8080 scrape https://example.com https://news.ycombinator.com

Puppeteer / Playwright

Puppeteer

bash
npm install puppeteer-core
javascript
import puppeteer from 'puppeteer-core';

const browser = await puppeteer.connect({
  browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser',
});

const page = await browser.newPage();
await page.goto('https://news.ycombinator.com');

const stories = await page.evaluate(() =>
  Array.from(document.querySelectorAll('.titleline > a'))
    .map(a => ({ title: a.textContent, url: a.href }))
);
console.log(stories);

await browser.disconnect();

Playwright

bash
npm install playwright-core
javascript
import { chromium } from 'playwright-core';

const browser = await chromium.connectOverCDP({
  endpointURL: 'ws://127.0.0.1:9222',
});

const page = await browser.newContext().then(ctx => ctx.newPage());
await page.goto('https://en.wikipedia.org/wiki/Web_scraping');
console.log(await page.title());

await browser.close();

Form submission & login

javascript
await page.goto('https://quotes.toscrape.com/login');
await page.evaluate(() => {
  document.querySelector('#username').value = 'admin';
  document.querySelector('#password').value = 'admin';
  document.querySelector('form').submit();
});
// Obscura handles the POST, follows the 302 redirect, maintains cookies

Benchmarks

Page load:

Page Obscura Chrome
Static HTML 51 ms ~500 ms
JS + XHR + fetch 84 ms ~800 ms
Dynamic scripts 78 ms ~700 ms

The full benchmark suite (WPT conformance, obstacle course, real-world corpus, and vs-Chrome speed) lives in a separate repo: https://github.com/h4ckf0r0day/obscura-benchmark

Stealth Mode

Build with --features render,stealth, then enable stealth at runtime with the global --stealth flag. The stealth build includes the complete rendering engine; enabling stealth does not remove screenshot, screencast, PDF, CDP, or MCP functionality.

Anti-fingerprinting

  • Per-session fingerprint randomization (GPU, screen, canvas, audio, battery)
  • Realistic navigator.userAgentData (Chrome 145, high-entropy values)
  • event.isTrusted = true for dispatched events
  • Hidden internal properties (Object.keys(window) safe)
  • Native function masking (Function.prototype.toString() → [native code])
  • navigator.webdriver = undefined (matches real Chrome)

Tracker Blocking

  • 3,520 domains blocked
  • Blocks analytics, ads, telemetry, and fingerprinting scripts
  • Prevents trackers from loading entirely
  • Enabled automatically with --stealth

CDP API

Obscura implements the Chrome DevTools Protocol for Puppeteer/Playwright compatibility.

Domain Methods
Target createTarget, closeTarget, attachToTarget, createBrowserContext, disposeBrowserContext
Page navigate

Issues· 197 open

View all issuesOpen on GitHub
  • #1141

    DOM mutation, MutationObserver, Range and node documents differ from the DOM spec

    Updated Oct 1, 2026
  • #1125

    cargo deny check licenses fails: jpeg-encoder includes the IJG license

    Updated Sep 30, 2026
  • #1124

    Native form POST navigations: missing response after redirect and events sent to an observer session

    Updated Sep 30, 2026
  • #1123

    Fetch.enable URL patterns are ignored for scripted requests and post-navigation pauses

    Updated Sep 30, 2026
  • #1122

    Idle waits and unchanged render work keep spending CPU after page load

    Updated Sep 30, 2026
  • #1120

    Host-sensitive test failures: macOS prefetch fixture read, robots scrape worker budget, taffy Style size

    Updated Sep 30, 2026
  • #1108

    SSRF deny error doesn't name --allow-private-network; agents conclude localhost is unsupported

    Updated Sep 29, 2026
  • #1103

    Track Playwright engine compatibility and performance verification

    Updated Sep 27, 2026
  • #1102

    getBoundingClientRect() returns a fixed placeholder box for every element except <html>/<body>

    Updated Sep 27, 2026
  • #1101

    CDP Emulation.setTouchEmulationEnabled is a no-op; Emulation.setEmulatedMedia not implemented

    Updated Sep 27, 2026

> Tags

Rustantidetectantidetect-browserbrowserbrowser-automation

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理