camofox-browser  by redf0x1

Anti-detection browser automation for AI agents

Created 4 months ago
302 stars

Top 88.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a robust anti-detection browser server designed for AI agents and automated tasks. It addresses the limitations of traditional browser automation tools like Puppeteer and Playwright, which are easily detected by modern bot mitigation systems due to their reliance on fragile JavaScript patches. CamoFox Browser Server leverages the Camoufox engine, a Firefox fork featuring C++ engine-level fingerprint spoofing, offering a more resilient solution. Its primary benefit is enabling AI agents and developers to perform browser automation tasks with a significantly reduced risk of detection, facilitated by a language-agnostic REST API and structured data extraction capabilities.

How It Works

CamoFox Browser Server utilizes the Camoufox browser engine, which implements anti-detection measures directly at the C++ engine level rather than through JavaScript injection. This approach provides more stable and comprehensive fingerprint spoofing compared to software-level patches. The server exposes a TypeScript-based REST API, allowing any programming language or AI agent to interact with the browser. It supports multi-session management, enabling concurrent, isolated browser contexts per user, each with persistent browser profiles that retain cookies, localStorage, and IndexedDB across sessions. Data extraction is enhanced through accessibility snapshots, providing structured data with stable element references, and a schema-driven structured extract feature for deterministic JSON output.

Quick Start & Requirements

  • Primary install/run:
    • From Source: Clone the repository, run npm install, npm run build, and npm start.
    • Via npm CLI: Install globally with npm install -g camofox-browser, then start the server with camofox-browser.
    • Via Docker: Build the image with docker build -t camofox-browser . and run using docker run.
  • Prerequisites: Node.js 20+ is required. A minimum of 2GB RAM is recommended, with Linux being the preferred OS for production environments due to memory-intensive browser operations.
  • Links:

Highlighted Details

  • Robust Anti-Detection: Employs C++ engine-level fingerprint spoofing via the Camoufox engine, passing bot detection on major platforms.
  • AI Agent Integration: Seamlessly integrates with AI coding assistants and LLM-powered automation tools via its REST API, OpenClaw compatibility, and dedicated skills.
  • Secure Auth Vault: Features AES-256-GCM encrypted credential storage, designed for LLM agent pipelines with a --inject flag that prevents secrets from appearing in stdout.
  • Structured Data Extraction: Enables deterministic JSON data extraction using defined schemas, avoiding the need for arbitrary JavaScript execution.
  • Persistent Browser Profiles: Automatically saves and loads cookies, localStorage, and IndexedDB, ensuring session continuity.
  • Playwright Tracing: Supports recording and exporting Playwright traces for detailed debugging of browser sessions.

Maintenance & Community

The project is currently in "Preview (Phase 1)", indicating ongoing development and potential for API changes. It builds upon the Camoufox engine by daijro and is developed by Jo Inc (YC W24). No specific community channels like Discord or Slack are listed in the README.

Licensing & Compatibility

The project is released under the MIT License, which permits commercial use and modification, making it broadly compatible for integration into proprietary systems.

Limitations & Caveats

As a "Preview (Phase 1)" release, the API surface is not guaranteed to be stable across minor versions, and users may need to manually reset local state (browser profiles, session files) if upgrades introduce incompatible changes. Recovery from corrupt or incompatible state requires manual intervention by deleting specific files. The system is resource-intensive, requiring significant RAM for browser contexts.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
3
Star History
55 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.