Obscura: A Lightweight Rust Headless Browser Built for AI Agents and Crawlers
Obscura is a Rust‑based headless browser that uses only 30 MB of memory and loads pages in 85 ms, offering built‑in anti‑detection, tracker blocking, zero external dependencies, and full Puppeteer/Playwright compatibility for AI automation and security‑research workloads.
Project Overview
Obscura is an open‑source headless‑browser engine written in Rust, designed for AI‑agent automation and web‑crawling. It runs real JavaScript via V8, supports the Chrome DevTools Protocol (CDP) and can replace headless Chrome in existing Puppeteer or Playwright workflows.
Key Features
Memory usage : 30 MB (Chrome > 200 MB)
Page load speed : 85 ms (Chrome ≈ 500 ms)
Binary size : 70 MB (Chrome ≈ 300 MB)
Built‑in anti‑detection : generates a unique fingerprint per session
Tracker blocking : automatically blocks more than 3 500 known tracking scripts
Zero external dependencies : single binary, no Node.js required
Performance Comparison
Memory usage – Obscura: 30 MB; Headless Chrome: 200 MB+
Binary size – Obscura: 70 MB; Headless Chrome: 300 MB+
Anti‑detection – Obscura: built‑in; Headless Chrome: none
Page load – Obscura: 85 ms; Headless Chrome: ~500 ms
Startup – Obscura: instant; Headless Chrome: ~2 s
Puppeteer support – both yes
Playwright support – both yes
Core Technical Highlights
1. Browser fingerprint randomization
Each session creates a distinct fingerprint covering GPU rendering, Canvas, audio context, battery API and other dimensions, so anti‑scraping scripts see a “real” Chrome browser instead of an automation tool. By contrast, Puppeteer and Playwright inject navigator.webdriver and similar variables that can be detected in milliseconds.
2. Automatic tracker blocking
The built‑in blocker is enabled by default and filters more than 3 500 known tracking scripts, reducing extra network requests and protecting privacy.
3. Zero‑dependency deployment
Obscura is distributed as a single binary that runs on Linux, macOS and Windows without installing Node.js or any runtime.
Quick Start
Installation
# Linux x86_64
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-linux.tar.gz
tar xzf obscura-x86_64-linux.tar.gz
./obscura fetch https://example.com -- eval "document.title"
# Linux ARM64
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-linux.tar.gz
tar xzf obscura-aarch64-linux.tar.gz
# macOS Apple Silicon
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-aarch64-macos.tar.gz
tar xzf obscura-aarch64-macos.tar.gz
# Docker
docker run -d --name obscura -p 127.0.0.1:9222:9222 h4ckf0r0day/obscuraBasic usage
# Get page title
obscura fetch https://example.com -- eval "document.title"
# Dump all links
obscura fetch https://example.com --dump links
# Render JS and export HTML
obscura fetch https://news.ycombinator.com --dump html
# Use a proxy
obscura --proxy socks5://127.0.0.1:1080 fetch https://example.com --dump text
# Wait for dynamic content
obscura fetch https://example.com --wait-until networkidle0Parallel scraping
obscura scrape url1 url2 url3 ... \
--concurrency 25 \
-- eval "document.querySelector('h1').textContent" \
--format jsonStart CDP server
# Start service (usable by Puppeteer/Playwright)
obscura serve --port 9222
# Enable stealth mode (anti‑detection + tracker blocking)
obscura serve --port 9222 --stealthPuppeteer integration example
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 integration example
import { chromium } from 'playwright-core';
const browser = await chromium.connectOverCDP({
endpointURL: 'ws://127.0.0.1:9222',
});
const page = await (await browser.newContext()).newPage();
await page.goto('https://en.wikipedia.org/wiki/Web_scraping');
console.log(await page.title());
await browser.close();Blue‑Team Perspective: Use Cases
Threat‑intel collection : anti‑detection helps bypass anti‑scraping measures on dark‑web forums and malicious sites.
Penetration‑test automation : 30 MB memory footprint allows many instances on a single server, boosting scanning efficiency.
Phishing detection and analysis : tracker blocking reduces unnecessary requests and lowers the chance of triggering target defenses.
Security‑research data gathering : lightweight design suits long‑running monitoring and archiving tasks.
Conclusion
Leveraging Rust’s memory‑management advantages and a design focused on automation, Obscura surpasses headless Chrome in both performance and functionality. It offers an efficient, stealthy, zero‑dependency solution for large‑scale web collection, AI‑agent automation, or security‑research workflows.
The project is released under the Apache‑2.0 license and is free to use. A cloud‑hosted version (Obscura Cloud) is under development to provide managed infrastructure, residential proxies and dedicated support.
Project URL: https://github.com/h4ckf0r0day/obscura
Documentation: https://docs.obscura.sh
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Black & White Path
We are the beacon of the cyber world, a stepping stone on the road to security.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
