Skip to content

Latest commit

 

History

History
114 lines (78 loc) · 3.96 KB

File metadata and controls

114 lines (78 loc) · 3.96 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Fused Gaming Ignition (ignition) is a Rust-based fork of chromiumoxide specialized for hardened browser automation on the Fused Gaming platform. It provides protocol-level stealth modifications to the Chrome DevTools Protocol (CDP) client to reduce the detection footprint of automated browser sessions on:

  • stakereload.com
  • stakereloadxs.com
  • gambareload.com

Build & Test Commands

# Build the project
cargo build

# Run unit tests (library only)
cargo test --lib

# Run integration tests (requires Chrome/Chromium installed)
RUST_TEST_THREADS=1 cargo test --test '*'

# Run a specific test
cargo test --lib test_name

# Format code
cargo fmt

# Run lints (CI requires no warnings)
cargo clippy --all -- -D warnings

# Check examples compile
cargo check --examples --features tokio-runtime,bytes

# Run an example
cargo run --example fused_gaming
cargo run --example stealth_bot
cargo run --example profile_demo

Workspace Structure

This is a Cargo workspace with multiple crates:

  • ignition (root) - Main library with stealth automation API
  • chromiumoxide_cdp - Generated CDP protocol definitions (~60K lines, generated at build time)
  • chromiumoxide_pdl - PDL (Protocol Definition Language) parser for generating CDP bindings
  • chromiumoxide_types - Shared types across crates
  • chromiumoxide_fetcher - Optional browser binary fetcher

Architecture

Core API Layers

  1. IgnitionPage (src/ignition.rs) - High-level stealth wrapper around Page

    • Stealth JS execution via Page.createIsolatedWorld (avoids Runtime.enable detection)
    • Human-like input simulation (Bezier mouse curves, variable typing delays)
    • Request interception via Fetch domain
    • Access underlying Page via raw_page()
  2. IgnitionProfile (src/profiles.rs) - Browser fingerprint profiles

    • Builder pattern for customizing OS, GPU, hardware specs
    • Generates User-Agent and bootstrap JS script for spoofing
    • Presets: fused_gaming(), windows(), linux(), macos_arm(), macos_intel()
  3. Page (src/page.rs) - Base CDP page abstraction (from chromiumoxide)

    • enable_stealth_mode() - Quick stealth setup with sensible defaults
    • Standard CDP operations (navigate, screenshot, cookies, etc.)
  4. StealthProfile trait (src/stealth.rs) - Legacy trait-based profile system

    • Pre-built profiles: WindowsNvidiaProfile, MacOSProfile, LinuxProfile

Key Design Decisions

  • Stealth execution: IgnitionPage.evaluate() uses Page.createIsolatedWorld to run JS without triggering Runtime.enable, which anti-bots detect. The regular Page.evaluate() triggers detection.

  • Profile consistency: All fingerprint values (User-Agent, platform, WebGL, hardware) must be internally consistent. A Windows UA with MacOS platform is immediately flagged.

  • Properties on prototypes: Stealth overrides are set on Navigator.prototype rather than navigator instance to avoid getOwnPropertyNames detection.

Runtime Features

Default features use tokio. For async-std:

cargo build --features async-std-runtime --no-default-features

Usage Pattern

// 1. Create Fused Gaming profile (or custom)
let profile = IgnitionProfile::fused_gaming().build();

// 2. Launch browser
let (browser, mut handler) = Browser::launch(BrowserConfig::builder().build()?).await?;
tokio::spawn(async move { while let Some(_) = handler.next().await {} });

// 3. Create page and wrap
let page = browser.new_page("about:blank").await?;
let ignition = IgnitionPage::new(page);

// 4. Apply profile BEFORE navigation
ignition.apply_profile(&profile).await?;

// 5. Navigate and interact
ignition.goto("https://stakereload.com").await?;
let title: Option<Value> = ignition.evaluate("document.title").await?;

Minimum Supported Rust Version

MSRV is 1.75 (checked in CI).