### Development setup and testing commands Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CONTRIBUTING.md Commands for installing Rust, building the project, and running unit or integration tests. ```bash # Install Rust (if not already installed) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Build the project cargo build # Run tests cargo test --lib # Run integration tests (requires Chrome/Chromium) RUST_TEST_THREADS=1 cargo test --test '*' ``` -------------------------------- ### Basic Usage Pattern Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CLAUDE.md Example demonstrating how to initialize a profile, launch a browser, and interact with a page using the ChaserPage wrapper. ```rust // 1. Create profile let profile = ChaserProfile::windows().chrome_version(130).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 chaser = ChaserPage::new(page); // 4. Apply profile BEFORE navigation chaser.apply_profile(&profile).await?; // 5. Navigate and interact chaser.goto("https://example.com").await?; let title: Option = chaser.evaluate("document.title").await?; ``` -------------------------------- ### BrowserConfig Setup Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Configures the browser instance, including executable path, headless mode, and viewport dimensions. ```rust let config = BrowserConfig::builder() .chrome_executable("/path/to/chrome") .new_headless_mode() // Headless (Chrome's new headless — less detectable) .with_head() // Headed window .viewport(Viewport { width: 1920, height: 1080, device_scale_factor: None, emulating_mobile: false, is_landscape: false, has_touch: false, }) .build()?; ``` -------------------------------- ### Install chaser-oxide dependencies Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Use cargo to add the necessary dependencies to your project. ```bash cargo add chaser-oxide tokio futures ``` -------------------------------- ### Build and Test Commands Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CLAUDE.md Standard Cargo commands for building, testing, linting, and running examples within the project. ```bash # 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 stealth_bot cargo run --example profile_demo ``` -------------------------------- ### Initialize Native Profile Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Launch a browser with a native profile that mimics the host OS and hardware. ```rust use chaser_oxide::{Browser, BrowserConfig, ChaserPage}; use futures::StreamExt; use serde_json::Value; #[tokio::main] async fn main() -> anyhow::Result<()> { let (browser, mut handler) = Browser::launch( BrowserConfig::builder() .new_headless_mode() .build() .map_err(|e| anyhow::anyhow!(e))?, ) .await?; tokio::spawn(async move { while let Some(_) = handler.next().await {} }); let page = browser.new_page("about:blank").await?; let chaser = ChaserPage::new(page); // Reads Chrome version from the live browser via CDP — accurate even // when using chromiumoxide_fetcher's downloaded binary chaser.apply_native_profile().await?; chaser.goto("https://example.com").await?; let title: Option = chaser.evaluate("document.title").await?; println!("{:?}", title); Ok(()) } ``` -------------------------------- ### Build with Alternative Runtime Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CLAUDE.md Command to build the project using the async-std runtime instead of the default tokio runtime. ```bash cargo build --features async-std-runtime --no-default-features ``` -------------------------------- ### BrowserConfig Builder Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Global browser configuration for launching the browser instance. ```APIDOC ## BrowserConfig Builder ### Description Configures the browser launch parameters. ### Methods - `chrome_executable(path: &str)`: Sets the path to the Chrome binary. - `new_headless_mode()`: Enables the new, less detectable headless mode. - `with_head()`: Launches in headed mode. - `viewport(viewport: Viewport)`: Sets the initial browser viewport dimensions. ``` -------------------------------- ### Clone the repository Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CONTRIBUTING.md Command to clone your fork of the repository. ```bash git clone https://github.com/YOUR_USERNAME/chaser-oxide.git ``` -------------------------------- ### ChaserProfile Builder Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Configuration for browser profiles including OS presets and hardware emulation settings. ```APIDOC ## ChaserProfile Builder ### Description Used to construct browser profiles that mimic specific hardware and OS environments. ### Builder Methods - `chrome_version(version: u32)`: Sets the emulated Chrome version. - `gpu(gpu: Gpu)`: Sets the emulated GPU hardware. - `memory_gb(gb: u32)`: Sets emulated system memory. - `cpu_cores(cores: u32)`: Sets emulated CPU core count. - `locale(locale: &str)`: Sets the browser locale. - `timezone(tz: &str)`: Sets the browser timezone. - `screen(width: u32, height: u32)`: Sets the screen resolution. ``` -------------------------------- ### Configure Cargo.toml dependencies Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Add the required dependencies directly to your Cargo.toml file. ```toml [dependencies] chaser-oxide = "0.2.3" tokio = { version = "1", features = ["full"] } futures = "0.3" anyhow = "1.0.102" serde_json = "1.0.149" ``` -------------------------------- ### ChaserProfile Builder Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Configures browser profiles to mimic specific operating systems and hardware environments. ```rust use chaser_oxide::{ChaserProfile, Gpu}; // Auto-detect from host environment let native = ChaserProfile::native().build(); // Explicit OS presets let windows = ChaserProfile::windows().build(); let linux = ChaserProfile::linux().build(); let mac_arm = ChaserProfile::macos_arm().build(); let mac_intel = ChaserProfile::macos_intel().build(); // Builder options (chain onto any preset) let custom = ChaserProfile::windows() .chrome_version(131) .gpu(Gpu::NvidiaRTX4080) .memory_gb(16) .cpu_cores(8) .locale("de-DE") .timezone("Europe/Berlin") .screen(2560, 1440) .build(); ``` -------------------------------- ### Code style and CI verification commands Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CONTRIBUTING.md Commands to format code and check for linting issues. ```bash cargo fmt cargo clippy --all cargo test --lib cargo fmt --check && cargo clippy --all ``` -------------------------------- ### Available GPUs Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Enumeration of supported GPU hardware identifiers for profile configuration. ```rust pub enum Gpu { // NVIDIA NvidiaRTX4090, NvidiaRTX4080, NvidiaRTX4070, NvidiaRTX3090, NvidiaRTX3080, NvidiaRTX3070, NvidiaRTX3060, NvidiaGTX1660, NvidiaGTX1080, // AMD AmdRX7900XTX, AmdRX6800XT, AmdRX6700XT, // Intel IntelUHD630, IntelIrisXe, // Apple AppleM1, AppleM1Pro, AppleM2, AppleM3, AppleM4Max, } ``` -------------------------------- ### Create a new branch Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CONTRIBUTING.md Command to create and switch to a new feature branch. ```bash git checkout -b feature/your-feature-name ``` -------------------------------- ### Configure Explicit OS Spoofing Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Define and apply a custom browser profile to spoof specific OS and hardware characteristics. ```rust use chaser_oxide::{Browser, BrowserConfig, ChaserPage, ChaserProfile, Gpu}; use futures::StreamExt; #[tokio::main] async fn main() -> anyhow::Result<()> { let profile = ChaserProfile::windows() .chrome_version(131) .gpu(Gpu::NvidiaRTX3080) .memory_gb(16) .cpu_cores(8) .locale("en-US") .timezone("America/New_York") .screen(1920, 1080) .build(); let (browser, mut handler) = Browser::launch( BrowserConfig::builder() .build() .map_err(|e| anyhow::anyhow!(e))?, ) .await?; tokio::spawn(async move { while let Some(_) = handler.next().await {} }); let page = browser.new_page("about:blank").await?; let chaser = ChaserPage::new(page); // Apply BEFORE navigation chaser.apply_profile(&profile).await?; chaser.goto("https://example.com").await?; Ok(()) } ``` -------------------------------- ### Check Rust version Source: https://github.com/0xchasercat/chaser-oxide/blob/main/CONTRIBUTING.md Command to report the current Rust version when submitting an issue. ```bash rustc --version ``` -------------------------------- ### ChaserPage Interface Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Defines the methods available for interacting with a browser page, including navigation, human-like input simulation, and request interception. ```rust impl ChaserPage { fn new(page: Page) -> Self; // Profile — call BEFORE navigation async fn apply_native_profile(&self) -> Result<()>; async fn apply_profile(&self, profile: &ChaserProfile) -> Result<()>; // Navigation async fn goto(&self, url: &str) -> Result<()>; async fn content(&self) -> Result; async fn url(&self) -> Result>; // JS evaluation (stealth — uses isolated world, no Runtime.enable leak) async fn evaluate(&self, script: &str) -> Result>; // Human-like mouse (Bezier curves with acceleration) async fn move_mouse_human(&self, x: f64, y: f64) -> Result<()>; async fn click_human(&self, x: f64, y: f64) -> Result<()>; async fn scroll_human(&self, delta_y: i32) -> Result<()>; // Typing async fn type_text(&self, text: &str) -> Result<()>; async fn type_text_with_typos(&self, text: &str) -> Result<()>; async fn press_key(&self, key: &str) -> Result<()>; async fn press_enter(&self) -> Result<()>; async fn press_tab(&self) -> Result<()>; // Request interception async fn enable_request_interception(&self, pattern: &str, resource_type: Option) -> Result<()>; async fn disable_request_interception(&self) -> Result<()>; async fn fulfill_request_html(&self, request_id: RequestId, html: &str, status: u16) -> Result<()>; async fn continue_request(&self, request_id: impl Into) -> Result<()>; // Escape hatch — raw_page().evaluate() triggers Runtime.enable detection! fn raw_page(&self) -> &Page; } ``` -------------------------------- ### ChaserPage Methods Source: https://github.com/0xchasercat/chaser-oxide/blob/main/README.md Methods available on the ChaserPage instance for browser navigation, stealth JS evaluation, and human-like interaction. ```APIDOC ## ChaserPage ### Description Represents a browser page with stealth capabilities for navigation and interaction. ### Methods - `apply_native_profile()`: Applies native environment profile. - `apply_profile(profile: &ChaserProfile)`: Applies a custom browser profile. - `goto(url: &str)`: Navigates to the specified URL. - `content()`: Returns the page content as a String. - `evaluate(script: &str)`: Executes JavaScript in an isolated world. - `move_mouse_human(x: f64, y: f64)`: Moves mouse using Bezier curves. - `click_human(x: f64, y: f64)`: Performs a human-like click. - `type_text(text: &str)`: Types text into the page. - `enable_request_interception(pattern: &str, resource_type: Option)`: Enables interception for specific requests. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.