### Build and Run BotBrowser Launcher Locally Source: https://github.com/botswin/botbrowser/blob/main/launcher/README.md These commands are used for manual setup. They install dependencies, download the Neutralino binary, build the application, and then run it. ```bash npm ci # installs dependencies + downloads Neutralino binary automatically ``` ```bash npm run build ``` ```bash npm run app ``` -------------------------------- ### Install BotBrowser Control from Source (Linux) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Installs Node.js using fnm, clones the repository, navigates to the control directory, installs dependencies, and starts the application. Requires Node.js 18+. ```bash # Requires Node.js 18+ — install via nvm or your package manager curl -fsSL https://fnm.vercel.app/install | bash fnm install 20 git clone https://github.com/botswin/BotBrowser.git cd BotBrowser/botbrowser-control npm install npm start ``` -------------------------------- ### Install BotBrowser Control from Source (Windows) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Clone the repository, navigate to the control directory, install dependencies, and start the application. Requires Node.js 18+. ```powershell # Requires Node.js 18+ (https://nodejs.org) git clone https://github.com/botswin/BotBrowser.git cd BotBrowser\botbrowser-control npm install npm start ``` -------------------------------- ### Bash: Headless Linux Screenshot Setup with Xvfb Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/SCREENSHOT_BEST_PRACTICES.md On headless Linux systems, use Xvfb to provide a virtual display. Ensure Xvfb's resolution is sufficient for your profile's screen dimensions. This example starts Xvfb and then launches BotBrowser. ```bash # Start Xvfb with sufficient resolution Xvfb :10 -screen 0 2560x1440x24 -ac & export DISPLAY=:10.0 # Launch BotBrowser chromium-browser \ --headless \ --no-sandbox \ --bot-profile="/path/to/profile.enc" \ --remote-debugging-port=9222 ``` -------------------------------- ### Install BotBrowser Control from Source (macOS) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Clone the repository, navigate to the control directory, install dependencies, and start the application. Requires Node.js 18+. ```bash # Requires Node.js 18+ (https://nodejs.org) git clone https://github.com/botswin/BotBrowser.git cd BotBrowser/botbrowser-control npm install npm start ``` -------------------------------- ### Install and Run BotBrowser Control from Source Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/README.md Clone the repository, install dependencies, and launch the application in development mode. ```bash git clone https://github.com/botswin/BotBrowser.git cd BotBrowser/botbrowser-control # adjust path if this is a standalone repo npm install npm start ``` -------------------------------- ### Install Dependencies and Build Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/BUILD.md Installs all project dependencies and then builds the project for all platforms. Output is directed to the 'dist/' folder. ```bash npm install # install all dependencies first npm run build # build for ALL platforms ``` -------------------------------- ### Dockerfile for BotBrowser Setup Source: https://github.com/botswin/botbrowser/blob/main/docker/virginaustralia_docker/README.md This Dockerfile outlines the steps to build a Docker image for the BotBrowser service. It installs necessary dependencies, copies application files, and sets up the environment. ```dockerfile FROM node:18-slim WORKDIR /app COPY package*.json ./ RUN npm install --omit=dev COPY . . # Install BotBrowser deb package # Ensure botbrowser_*.deb is in the repo root RUN dpkg -i botbrowser_*.deb || apt-get update && apt-get install -f -y # Ensure BotBrowser executable is in PATH RUN ln -sf /usr/bin/botbrowser /usr/local/bin/botbrowser EXPOSE 3000 CMD ["node", "main.js"] ``` -------------------------------- ### Ubuntu Manual Installation (dpkg) Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs BotBrowser on Ubuntu using a .deb package. Use this if the script-based installation is not suitable. ```bash sudo dpkg -i botbrowser__amd64.deb ``` -------------------------------- ### Install Puppeteer and Initialize Project Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/PUPPETEER.md Run these commands in your terminal to set up a new Node.js project and install the necessary Puppeteer package. ```bash npm init -y npm install puppeteer-core ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/BUILD.md Navigates to the botbrowser-control directory and installs all necessary project dependencies using npm. ```bash cd botbrowser-control npm install ``` -------------------------------- ### Quick Start: Emulate Android WebView Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/platform/ANDROID_WEBVIEW.md Use this command to launch Chromium with Android WebView emulation. Ensure you have an Android profile and the BotBrowser binary installed. ```bash chromium-browser \ --bot-profile="/path/to/android-profile.enc" \ --bot-config-browser-brand=webview \ --bot-config-platform=Android \ --bot-config-platform-version=13 \ --bot-config-model=SM-G991B \ --bot-config-mobile=true \ --user-agent="Mozilla/5.0 (Linux; Android {platform-version}; {model} Build/TP1A.220624.021; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/{ua-full-version} Mobile Safari/537.36" ``` -------------------------------- ### Install BotBrowser Control via .rpm package (Linux) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Download the .rpm package and install it using rpm or dnf. Then launch the application. ```bash # Download and install wget https://github.com/botswin/BotBrowser/releases/download/vX.X.X/botbrowser-control-X.X.X.x86_64.rpm sudo rpm -i botbrowser-control-*.rpm # Or with dnf sudo dnf install botbrowser-control-*.rpm # Launch botbrowser-control ``` -------------------------------- ### Ubuntu Command-Line Example Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Launches Chromium with a specified user data directory and an encrypted profile on Ubuntu. ```bash chromium-browser \ --user-data-dir="$(mktemp -d)" \ --bot-profile="/absolute/path/to/profile.enc" ``` -------------------------------- ### Build BotBrowser Control Installer (Windows) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Installs dependencies and builds NSIS installer, portable executable, and ZIP archive into the dist\ directory. ```powershell npm install npm run build:win # builds NSIS + portable + ZIP into dist\ ``` -------------------------------- ### HTTP Proxy with Credentials Example Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/network/PROXY_CONFIGURATION.md Example of configuring an HTTP proxy with embedded username and password using the `--proxy-server` argument. ```bash --proxy-server=http://myuser:mypass@proxy.example.com:8080 ``` -------------------------------- ### Install Node.js using fnm (Cross-platform) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Installs Fast Node Manager (fnm) and then installs Node.js version 20. ```bash # Using fnm (faster, cross-platform) curl -fsSL https://fnm.vercel.app/install | bash fnm install 20 ``` -------------------------------- ### Install Dependencies and Run Tests Source: https://github.com/botswin/botbrowser/blob/main/tests/README.md Commands to install project dependencies, run Playwright tests, and generate an analysis report. ```bash # Install dependencies npm install # Run tests npx playwright test # Generate analysis report npx playwright show-report ``` -------------------------------- ### Recommended Mesa llvmpipe Setup Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/LINUX_GPU_BACKEND.md This is the recommended setup for using Mesa llvmpipe via ANGLE GL. It is a modern and more stable configuration compared to the legacy SwiftShader setup. ```bash chromium-browser \ --headless \ --use-angle=gl \ --bot-gpu-emulation=false \ --bot-profile="/path/to/profile.enc" ``` -------------------------------- ### SOCKS5 Proxy with Credentials Example Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/network/PROXY_CONFIGURATION.md Example of configuring a SOCKS5 proxy with embedded username and password using the `--proxy-server` argument. ```bash --proxy-server=socks5://myuser:mypass@proxy.example.com:1080 ``` -------------------------------- ### macOS Command-Line Example Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Launches Chromium with a specified user data directory and an encrypted profile on macOS. ```bash /Applications/Chromium.app/Contents/MacOS/Chromium \ --user-data-dir="$(mktemp -d)" \ --bot-profile="/absolute/path/to/profile.enc" ``` -------------------------------- ### Install BotBrowser Control via .deb package (Linux) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Download the .deb package, install it using dpkg, and fix any missing dependencies with apt. Then launch the application. ```bash # Download and install wget https://github.com/botswin/BotBrowser/releases/download/vX.X.X/botbrowser-control_X.X.X_amd64.deb sudo dpkg -i botbrowser-control_*.deb # Fix any missing dependencies sudo apt install -f # Launch botbrowser-control ``` -------------------------------- ### Enable and Start BotBrowser Systemd Service Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/HEADLESS_SERVER_SETUP.md Commands to reload the systemd daemon, enable the BotBrowser service to start on boot, and start the service immediately. ```bash sudo systemctl daemon-reload sudo systemctl enable botbrowser sudo systemctl start botbrowser ``` -------------------------------- ### Install .deb Package with Dependencies Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md After attempting to install a .deb package with dpkg -i, run this command to resolve missing dependencies. ```bash sudo apt install -f ``` -------------------------------- ### Ubuntu Quick Install Script Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs BotBrowser on Ubuntu using a curl script. Supports auto-detection of architecture or specifying a Chrome version. ```bash # One-line install (auto-detects architecture: x86_64 or arm64) curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash ``` ```bash # Install specific Chrome version curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash -s -- 146 ``` ```bash # Download only, don't install curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash -s -- --download ``` -------------------------------- ### Install System Packages for BotBrowser Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/HEADLESS_SERVER_SETUP.md Installs necessary system libraries required by BotBrowser on Ubuntu. Ensure you have root or sudo access. ```bash sudo apt-get update sudo apt-get install -y \ libnss3 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libxcomposite1 \ libxdamage1 \ libxrandr2 \ libgbm1 \ libxkbcommon0 \ libgtk-3-0 \ libpangocairo-1.0-0 \ libpango-1.0-0 \ libwayland-client0 \ libwayland-server0 \ libdbus-1-3 \ libatspi2.0-0 \ libasound2 \ libxss1 \ fonts-liberation \ xvfb ``` -------------------------------- ### Install Build Dependencies Source: https://github.com/botswin/botbrowser/blob/main/patches/build/README.md Installs essential packages required for building BotBrowser on Ubuntu. Ensure your system meets the specified RAM and disk space requirements before running. ```bash apt install -y fonts-liberation devscripts equivs software-properties-common \n libmpfr-dev libgmp3-dev libmpc-dev libstdc++-12-dev clang avahi-daemon \n libavahi-client-dev libnss-mdns qtbase5-dev libqt5widgets5 libx11-xcb-dev ``` -------------------------------- ### Example Profile `configs` Block Source: https://github.com/botswin/botbrowser/blob/main/profiles/PROFILE_CONFIGS.md This snippet shows a comprehensive example of a `configs` block within a browser profile, illustrating various settings for privacy and fingerprinting protection. ```json5 { "configs": { // Browser locale (auto = derived from proxy IP and language settings) "locale": "auto", // Accept-Language header values (auto = IP-based detection) "languages": "auto", // Color scheme: 'light' or 'dark' "colorScheme": "light", // Proxy settings: hostname:port, with optional basic auth "proxy": { "server": "1.2.3.4:8080", "ip": "1.2.3.4" }, // Disable GUI scaling based on device scale factor (ignore DevicePixelRatio for UI scaling) "disableDeviceScaleFactorOnGUI": false, // timezone: 'auto' = based on IP; 'real' = system timezone; any other string = custom "timezone": "auto", // location: 'auto' = based on IP; 'real' = system (GPS) location; // object = custom coordinates "location": "auto", // or "real" or { latitude: 48.8566, longitude: 2.3522 } // window: 'profile' = use profile’s dimensions; // 'real' = use system window size; // object = custom dimensions "window": "profile", // or "real" or { innerWidth: 1280, innerHeight: 720, outerWidth: 1280, outerHeight: 760, screenX: 100, screenY: 50, devicePixelRatio: 1 } // screen: 'profile' = use profile’s screen metrics; // 'real' = use system screen metrics; // object = custom metrics "screen": "profile", // or "real" or { width: 1280, height: 720, colorDepth: 24, pixelDepth: 24 } // WebRTC: 'profile' = profile’s settings; 'real' = native; 'disabled' = no WebRTC "webrtc": "profile", // WebRTC ICE servers: 'google' preset or 'custom:stun:...,turn:...' "webrtcICE": "google", // Keep the window active even when unfocused (suppresses blur/visibilitychange) "alwaysActive": true, // Fonts: 'profile' = profile’s embedded list; 'expand' = fill gaps with system fonts; 'real' = system-installed fonts "fonts": "profile", // WebGL: 'profile' = profile’s parameters; 'real' = system implementation; 'disabled' = off "webgl": "profile", // WebGPU: same semantics as WebGL "webgpu": "profile", // Media devices: 'profile' = synthetic camera/mic devices; 'real' = actual system devices "mediaDevices": "profile", // Media types: 'expand' = prefer local decoders; switch to 'profile' for legacy behavior "mediaTypes": "expand", // Speech voices: 'profile' = profile’s synthetic voices; 'real' = system voices "speechVoices": "profile", // noiseCanvas: Introduce controlled variance to Canvas for fingerprint protection "noiseCanvas": true, // noiseWebglImage: Introduce controlled variance to WebGL for fingerprint protection "noiseWebglImage": true, // noiseAudioContext: Introduce controlled variance to AudioContext for fingerprint protection "noiseAudioContext": true, // noiseClientRects: Introduce controlled variance to client rects for fingerprint protection "noiseClientRects": false, // noiseTextRects: Introduce controlled variance to TextRects for fingerprint protection "noiseTextRects": true, // browserBrand: override for browser identity fields. Supports "chromium", "chrome", "edge", "brave", "opera", and "webview" (ENT Tier3). WebKit-family identities use ENT Tier4 premium profiles. "browserBrand": "chrome", // brandFullVersion: optional brand-specific full version string for UA-CH tuples when the vendor's cadence diverges "brandFullVersion": "142.0.3595.65", // injectRandomHistory: Adds synthetic navigation history for session authenticity // Accepts true (random 2-7 entries), a number (e.g. 15), or false "injectRandomHistory": false, // enableVariationsInContext (ENT Tier2): Include X-Client-Data headers in incognito contexts for Google domains "enableVariationsInContext": false, // disableDebugger: Prevents unintended interruptions from JavaScript debugger statements during fingerprint protection workflows "disableDebugger": true, // disableConsoleMessage: Suppress console.* output forwarded through CDP logging "disableConsoleMessage": true, // keyboard: choose keyboard fingerprint source: "profile" (emulated from profile) or "real" (use system keyboard) "keyboard": "profile", // mobileForceTouch: Force touch events on/off when simulating mobile devices "mobileForceTouch": false, // portProtection (PRO): Protect local service ports (VNC, RDP, etc.) from being scanned "portProtection": false, // customHeaders (PRO): inject custom HTTP headers into all outgoing requests "customHeaders": { "X-Custom-Header": "value" }, // timeSeed (ENT Tier2): deterministic execution timing diversity "timeSeed": 42, // stackSeed (ENT Tier2): "profile", "real", or positive integer seed "stackSeed": "profile", // networkInfoOverride: use profile-defined navigator.connection values "networkInfoOverride": true } } ``` -------------------------------- ### Minimal BotBrowser Launch Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/CLI_RECIPES.md Starts BotBrowser with a specified profile and a temporary user data directory. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" \ --user-data-dir="$(mktemp -d)" ``` -------------------------------- ### SOCKS5H Proxy with Credentials Example Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/network/PROXY_CONFIGURATION.md Example of configuring a SOCKS5H proxy with embedded username and password using the `--proxy-server` argument. DNS resolution is handled through the proxy. ```bash --proxy-server=socks5h://myuser:mypass@proxy.example.com:1080 ``` -------------------------------- ### Multi-Instance Setup (Instance 3: Custom Window/Screen Size) Source: https://github.com/botswin/botbrowser/blob/main/CLI_FLAGS.md Configures the third instance with custom window and screen dimensions for specific viewport testing, such as for OCR. ```bash chromium-browser \ --bot-profile="/absolute/path/to/profile.enc" \ --bot-config-window="1920x1080" \ --bot-config-screen="2560x1440" \ --user-data-dir="/tmp/instance3" & ``` -------------------------------- ### Launch BotBrowser with V8Log Enabled (Sample Mode) Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/V8LOG.md Launches Chromium with V8Log set to 'sample' mode, directing output to a specified directory. Ensure the output directory exists and is writable. ```bash mkdir -p /tmp/botbrowser-v8log chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-v8-log=sample \ --bot-v8-log-dir=/tmp/botbrowser-v8log \ --user-data-dir="$(mktemp -d)" \ "https://example.com" ``` -------------------------------- ### WebGL1 Basic Triangle Example Source: https://github.com/botswin/botbrowser/blob/main/docs/tools/canvaslab/webgl_simple_test.html This snippet demonstrates a basic WebGL1 setup to draw a simple triangle. It includes shader creation, compilation, and attribute pointer configuration. ```javascript (() => { log('=== Canvas 2: WebGL1 Basic ==='); const canvas = document.getElementById('c2'); const gl = canvas.getContext('webgl'); if (!gl) { log('WebGL not supported'); return; } log('WebGL context created'); // Simple triangle with WebGL1 const vs = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vs, ` attribute vec2 a_pos; void main() { gl_Position = vec4(a_pos, 0.0, 1.0); } ` ); gl.compileShader(vs); const fs = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fs, ` precision mediump float; void main() { gl_FragColor = vec4(0.2, 0.6, 1.0, 1.0); } ` ); gl.comp ``` -------------------------------- ### Multi-Instance Setup (Instance 1: Chrome, Cookies, Bookmarks) Source: https://github.com/botswin/botbrowser/blob/main/CLI_FLAGS.md Sets up the first instance with Chrome branding, specific cookies, and bookmarks. This is an ENT Tier2 feature for browser brand. ```bash chromium-browser \ --bot-profile="/absolute/path/to/profile.enc" \ --bot-config-browser-brand="chrome" \ --bot-config-window="profile" \ --bot-cookies='[{"url":"https://example.com","name":"sessionid","value":"abc123","domain":".example.com"}]' \ --bot-bookmarks='[{"title":"Work Site","url":"https://work.example.com","type":"url"}]' \ --user-data-dir="/tmp/instance1" & ``` -------------------------------- ### Multi-Instance Setup (Instance 2: Edge, Real Window) Source: https://github.com/botswin/botbrowser/blob/main/CLI_FLAGS.md Sets up the second instance with Edge branding and real window settings. This is an ENT Tier2 feature for browser brand. ```bash chromium-browser \ --bot-profile="/absolute/path/to/profile.enc" \ --bot-config-browser-brand="edge" \ --bot-config-window="real" \ --user-data-dir="/tmp/instance2" & ``` -------------------------------- ### Draw Simple Colored Triangle with WebGL1 Source: https://github.com/botswin/botbrowser/blob/main/docs/tools/canvaslab/webgl_complex_test.html Renders a basic colored triangle using WebGL1. This example demonstrates shader creation, buffer setup, attribute pointers, and drawing. ```javascript const vs = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vs, ` attribute vec2 a_pos; attribute vec3 a_color; varying vec3 v_color; void main() { gl_Position = vec4(a_pos, 0.0, 1.0); v_color = a_color; } `); gl.compileShader(vs); const fs = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fs, ` precision mediump float; varying vec3 v_color; void main() { gl_FragColor = vec4(v_color, 1.0); } `); gl.compileShader(fs); const prog = gl.createProgram(); gl.attachShader(prog, vs); gl.attachShader(prog, fs); gl.linkProgram(prog); gl.useProgram(prog); const buf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buf); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ // pos color 0.0, 0.7, 1, 0, 0, -0.7, -0.7, 0, 1, 0, 0.7, -0.7, 0, 0, 1, ]), gl.STATIC_DRAW); const aPos = gl.getAttribLocation(prog, 'a_pos'); const aCol = gl.getAttribLocation(prog, 'a_color'); gl.enableVertexAttribArray(aPos); gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 20, 0); gl.enableVertexAttribArray(aCol); gl.vertexAttribPointer(aCol, 3, gl.FLOAT, false, 20, 8); gl.clearColor(0.95, 0.95, 0.95, 1.0); gl.clear(gl.COLOR_BUFFER_BIT); gl.drawArrays(gl.TRIANGLES, 0, 3); gl.flush(); ``` -------------------------------- ### Rotate Proxies Across Regions Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/network/DYNAMIC_PROXY_SWITCHING.md Demonstrates switching between geographic regions within the same BrowserContext, with automatic geo re-detection after each switch. This example shows starting with a US proxy, switching to a UK proxy, and then to a Japan proxy. ```javascript const client = await browser.target().createCDPSession(); // must use browser-level session // Start with US proxy await client.send("BotBrowser.setBrowserContextProxy", { browserContextId: ctx._contextId, proxyServer: "socks5://user:pass@us-proxy.example.com:1080", proxyIp: "203.0.113.1", }); await page.goto("https://example.com"); // Switch to UK proxy await client.send("BotBrowser.setBrowserContextProxy", { browserContextId: ctx._contextId, proxyServer: "socks5h://user:pass@uk-proxy.example.com:1080", proxyIp: "198.51.100.1", }); await page.goto("https://example.co.uk"); // Switch to Japan proxy await client.send("BotBrowser.setBrowserContextProxy", { browserContextId: ctx._contextId, proxyServer: "socks5://user:pass@jp-proxy.example.com:1080", proxyIp: "192.0.2.1", }); await page.goto("https://example.co.jp"); ``` -------------------------------- ### Automated Verification Script with Playwright Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/FIRST_VERIFICATION.md This script uses Playwright to launch BotBrowser, navigate to specified websites, and take screenshots for verification. It includes setup for executable path and profile path via environment variables. Ensure Playwright is installed and BotBrowser is correctly configured. ```javascript import { chromium } from "playwright-core"; const EXEC = process.env.BOTBROWSER_EXEC_PATH; const PROFILE = process.env.BOT_PROFILE_PATH; const sites = [ { name: "CreepJS", url: "https://abrahamjuliot.github.io/creepjs/", wait: 15000 }, { name: "BrowserLeaks", url: "https://browserleaks.com/", wait: 10000 }, ]; const browser = await chromium.launch({ executablePath: EXEC, headless: true, args: [ "--disable-audio-output", `--bot-profile=${PROFILE}`, ], }); for (const site of sites) { const page = await browser.newPage(); await page.addInitScript(() => { delete window.__playwright__binding__; delete window.__pwInitScripts; }); console.log(`Testing ${site.name}...`); await page.goto(site.url); await page.waitForTimeout(site.wait); await page.screenshot({ path: `verification-${site.name.toLowerCase()}.png`, fullPage: true, }); await page.close(); console.log(` Screenshot saved: verification-${site.name.toLowerCase()}.png`); } await browser.close(); console.log("Verification complete. Review the screenshots."); ``` -------------------------------- ### WebGL2 Full Pipeline Example Source: https://github.com/botswin/botbrowser/blob/main/docs/tools/canvaslab/webgl_simple_test.html This snippet demonstrates a complete WebGL2 rendering pipeline, including shader compilation, vertex buffer setup, texture creation, state configuration, drawing a triangle, and reading pixel data. It also logs context attributes and supported extensions. ```javascript const logEl = document.getElementById('log'); const log = (msg) => { logEl.textContent += msg + '\n'; console.log(msg); }; // ===================== Canvas 1: WebGL2 Full Pipeline ===================== (() => { log('=== Canvas 1: WebGL2 Full Pipeline ==='); const canvas = document.getElementById('c1'); const gl = canvas.getContext('webgl2', { antialias: true, alpha: true }); if (!gl) { log('WebGL2 not supported'); return; } log('WebGL2 context created'); // --- Shaders --- const vsSource = `#version 300 es in vec2 a_position; in vec3 a_color; out vec3 v_color; void main() { gl_Position = vec4(a_position, 0.0, 1.0); v_color = a_color; }` ; const fsSource = `#version 300 es precision mediump float; in vec3 v_color; out vec4 fragColor; void main() { fragColor = vec4(v_color, 1.0); }` ; function createShader(type, source) { const s = gl.createShader(type); gl.shaderSource(s, source); gl.compileShader(s); if (!gl.getShaderParameter(s, gl.COMPILE_STATUS)) { log('Shader error: ' + gl.getShaderInfoLog(s)); } return s; } const vs = createShader(gl.VERTEX_SHADER, vsSource); const fs = createShader(gl.FRAGMENT_SHADER, fsSource); const prog = gl.createProgram(); gl.attachShader(prog, vs); gl.attachShader(prog, fs); gl.linkProgram(prog); gl.validateProgram(prog); gl.useProgram(prog); log('Shaders compiled & linked'); // --- VAO + Buffer --- const vao = gl.createVertexArray(); gl.bindVertexArray(vao); const buf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buf); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ // x, y, r, g, b 0.0, 0.5, 1, 0, 0, -0.5, -0.5, 0, 1, 0, 0.5, -0.5, 0, 0, 1, ]), gl.STATIC_DRAW); const aPos = gl.getAttribLocation(prog, 'a_position'); const aCol = gl.getAttribLocation(prog, 'a_color'); gl.enableVertexAttribArray(aPos); gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 20, 0); gl.enableVertexAttribArray(aCol); gl.vertexAttribPointer(aCol, 3, gl.FLOAT, false, 20, 8); log('Buffers set up'); // --- Texture --- const tex = gl.createTexture(); gl.activeTexture(gl.TEXTURE0); gl.bindTexture(gl.TEXTURE_2D, tex); const pixels = new Uint8Array([ 255,0,0,255, 0,255,0,255, 0,0,255,255, 255,255,0,255 ]); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); gl.generateMipmap(gl.TEXTURE_2D); log('Texture created'); // --- State --- gl.enable(gl.BLEND); gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); gl.viewport(0, 0, 256, 256); gl.clearColor(0.1, 0.1, 0.15, 1.0); gl.clearDepth(1.0); gl.depthFunc(gl.LEQUAL); gl.enable(gl.DEPTH_TEST); gl.colorMask(true, true, true, true); gl.scissor(0, 0, 256, 256); log('State configured'); // --- Draw --- gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); gl.drawArrays(gl.TRIANGLES, 0, 3); gl.flush(); log('Draw complete'); // --- Read --- const px = new Uint8Array(4); gl.readPixels(128, 128, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, px); log(`readPixels center: [${px.join(', ')}]`); const exts = gl.getSupportedExtensions(); log(`Extensions: ${exts.length} found`); const attrs = gl.getContextAttributes(); log(`Context attributes: ${JSON.stringify(attrs)}`); log(`Renderer: ${gl.getParameter(gl.RENDERER)}`); log(`Vendor: ${gl.getParameter(gl.VENDOR)}`); log(`Version: ${gl.getParameter(gl.VERSION)}`); log(`Max texture size: ${gl.getParameter(gl.MAX_TEXTURE_SIZE)}`); // --- Cleanup --- gl.deleteTexture(tex); gl.deleteBuffer(buf); gl.deleteVertexArray(vao); gl.deleteProgram(prog); gl.deleteShader(vs); gl.deleteShader(fs); log('Canvas 1 cleanup done\n'); })(); ``` -------------------------------- ### Install Playwright Core Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/PLAYWRIGHT.md Install the necessary Playwright package for your project. Ensure Node.js 18+ is installed. ```bash npm init -y npm install playwright-core ``` -------------------------------- ### Quick Start: Optimized BotBrowser Launch Command Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/PERFORMANCE_OPTIMIZATION.md Apply essential optimizations for faster startup and reduced resource usage. This command includes flags to bypass IP lookup, disable audio, and use a temporary user data directory. ```bash chromium-browser \ --headless \ --no-sandbox \ --bot-profile="/path/to/profile.enc" \ --proxy-server=socks5://user:pass@proxy.example.com:1080 \ --proxy-ip="203.0.113.1" \ --disable-audio-output \ --user-data-dir="$(mktemp -d)" ``` -------------------------------- ### Ubuntu Docker/CI Installation Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs BotBrowser within a Docker container or CI environment using the installation script. ```dockerfile RUN curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash ``` -------------------------------- ### Install Wine on macOS Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/BUILD.md Installs the stable version of Wine on macOS using Homebrew. Wine is necessary for building Windows NSIS installers on macOS. ```bash brew install --cask wine-stable ``` -------------------------------- ### Start Mirror Client Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/MIRROR_DISTRIBUTED.md Launch a BotBrowser instance that will mirror the controller's actions. Specify the profile and the controller's endpoint. A proxy server can also be configured. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-mirror-client-endpoint=controller-ip:9333 \ --proxy-server=socks5://user:pass@proxy.example.com:1080 ``` -------------------------------- ### Download BotBrowser Only (macOS Script) Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Downloads the BotBrowser installation script on macOS without executing the installation. Useful for inspecting the script or manual installation. ```bash curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash -s -- --download ``` -------------------------------- ### Install BotBrowser Control via AppImage (Linux) Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/INSTALL.md Download the AppImage, make it executable, and run it. This method works on most Linux distributions. ```bash # Download wget https://github.com/botswin/BotBrowser/releases/download/vX.X.X/BotBrowser.Control-X.X.X.AppImage # Make executable chmod +x BotBrowser.Control-*.AppImage # Run ./BotBrowser.Control-*.AppImage ``` -------------------------------- ### Install Latest BotBrowser (macOS Script) Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs the latest version of BotBrowser on macOS by downloading and executing a shell script. The script auto-detects architecture and installs to /Applications. ```bash curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash ``` -------------------------------- ### Team Collaboration Setup Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/MIRROR_DISTRIBUTED.md Configure a controller for a team lead and multiple clients for team members to share and interact with a browser session in real time. ```bash # Team lead (controller) chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-mirror-controller-endpoint=0.0.0.0:9333 # Team member 1 (client) chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-mirror-client-endpoint=lead-machine:9333 # Team member 2 (client) chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-mirror-client-endpoint=lead-machine:9333 ``` -------------------------------- ### Install Specific Chrome Version (macOS Script) Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs BotBrowser for a specific Chrome version on macOS using a shell script. The script auto-detects architecture and installs to /Applications. ```bash curl -sL https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.sh | bash -s -- 146 ``` -------------------------------- ### Install Mesa Userspace Packages on Debian/Ubuntu Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/LINUX_GPU_BACKEND.md Installs necessary Mesa userspace packages to resolve 'libGL error: failed to load driver: swrast'. Ensure these are installed for proper GL functionality. ```bash sudo apt-get install -y libgl1-mesa-dri libglx-mesa0 libegl-mesa0 ``` -------------------------------- ### Launch BotBrowser with Profile and Proxy Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/FIRST_VERIFICATION.md Launches BotBrowser with a specified profile and proxy server. Ensure BotBrowser binary is installed and a profile file is available. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" \ --proxy-server=socks5://user:pass@proxy.example.com:1080 \ --user-data-dir="$(mktemp -d)" ``` -------------------------------- ### Ubuntu Dependency Installation Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs essential libraries required for BotBrowser on Ubuntu systems. ```bash # Essential libraries sudo apt-get update sudo apt-get install -y \ libnss3 \ libatk-bridge2.0-0 \ libdrm2 \ libxcomposite1 \ libxdamage1 \ libxrandr2 \ libgbm1 \ libxkbcommon0 \ libgtk-3-0 ``` -------------------------------- ### Display Installed Kernels or Prompt for Download Source: https://github.com/botswin/botbrowser/blob/main/launcher/src/app/kernel-management/kernel-management.component.html Renders a list of installed kernels with their version, platform, and date, or displays a message prompting the user to download a kernel if none are installed. This is the main view for managing local kernels. ```html @if (dataSource.data.length === 0) { memory No kernels installed Download a kernel from the list below to get started } @else { Version **{{ element.majorVersion }}** ({{ element.fullVersion }}) Platform {{ getPlatformLabel(element.platform) }} Date {{ formatAssetDate(element.assetDate) || formatDate(element.installedAt) }} folder_open delete } ``` -------------------------------- ### Launch BotBrowser with a Profile Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/getting-started/PROFILE_MANAGEMENT.md This command launches the BotBrowser binary with a specified profile file. It also creates a temporary directory for user data. Ensure the profile path is absolute. ```bash chromium-browser \ --bot-profile="/absolute/path/to/profile.enc" \ --user-data-dir="$(mktemp -d)" ``` -------------------------------- ### Install ARM Sysroot Source: https://github.com/botswin/botbrowser/blob/main/patches/build/README.md Installs the sysroot necessary for building BotBrowser for ARM architectures. This is a prerequisite for cross-compiling. ```bash ./build/linux/sysroot_scripts/install-sysroot.py --arch=arm ``` -------------------------------- ### Cross-Platform Consistency Verification Setup Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/MIRROR_DISTRIBUTED.md Set up a controller on Windows and clients on macOS and Ubuntu to verify identical fingerprint output across different operating systems using the same profile. ```bash # Controller on Windows chrome.exe --bot-profile="C:\\profiles\\profile.enc" --bot-mirror-controller-endpoint=0.0.0.0:9333 # Client on macOS /Applications/Chromium.app/Contents/MacOS/Chromium --bot-profile="profiles/profile.enc" --bot-mirror-client-endpoint=windows-machine:9333 # Client on Ubuntu chromium-browser --bot-profile="profiles/profile.enc" --bot-mirror-client-endpoint=windows-machine:9333 ``` -------------------------------- ### Install Node.js Packages for Storage Access Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/identity/STORAGE_ACCESS.md Install the necessary Node.js packages for reading SQLite and LevelDB storage. ```bash npm install better-sqlite3 level ``` -------------------------------- ### Launch Mirror with CLI Flags (Local) Source: https://github.com/botswin/botbrowser/blob/main/examples/mirror/README.md Launches a controller and two clients using command-line flags for local verification. Requires BotBrowser executable and a profile file. ```bash BOTBROWSER_EXEC_PATH=/path/to/chromium \ BOT_PROFILE_PATH=/path/to/profile.enc \ ./cli_launch.sh ``` -------------------------------- ### Start Mirror Controller Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/deployment/MIRROR_DISTRIBUTED.md Launch the main BotBrowser instance that will control the distributed session. Specify the profile and the controller endpoint. A proxy server can also be configured. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-mirror-controller-endpoint=0.0.0.0:9333 \ --proxy-server=socks5://user:pass@proxy.example.com:1080 ``` -------------------------------- ### Launch BotBrowser for Development with Real Devices Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/fingerprint/MEDIA_DEVICES.md Launch BotBrowser using the 'real' setting for media devices and include a temporary user data directory. This configuration allows for testing with the host system's actual audio and video hardware. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-config-media-devices=real \ --user-data-dir="$(mktemp -d)" ``` -------------------------------- ### Launch Browser and Check hardwareConcurrency Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/fingerprint/CPU_CORE_SCALING.md Launches a browser instance with a specified BotBrowser profile and verifies the navigator.hardwareConcurrency value. Worker-based benchmarks will exhibit scaling behavior consistent with the profile's core count. ```javascript const browser = await chromium.launch({ executablePath: process.env.BOTBROWSER_EXEC_PATH, headless: true, args: [ "--bot-profile=/path/to/mobile-profile.enc", ], }); const page = await browser.newPage(); const cores = await page.evaluate(() => navigator.hardwareConcurrency); console.log(cores); // 4 (from profile) // Worker-based parallel benchmarks will show 4-core scaling behavior await browser.close(); ``` -------------------------------- ### Launch Browser with Bookmarks (Bash) Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/identity/BOOKMARK_SEEDING.md Use this command to launch Chromium with a profile and pre-defined bookmarks. Ensure the profile path and bookmark JSON are correctly formatted. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" \ --bot-bookmarks='[{"title":"Google","type":"url","url":"https://www.google.com"},{"title":"News","type":"folder","children":[{"title":"BBC","type":"url","url":"https://www.bbc.com"}]}]' ``` -------------------------------- ### Package BotBrowser without Installer Source: https://github.com/botswin/botbrowser/blob/main/botbrowser-control/BUILD.md Execute this command to package BotBrowser into an unpacked application directory, suitable for distribution without an installer. ```bash npm run pack # outputs to dist/linux-unpacked, dist/mac, or dist/win-unpacked ``` -------------------------------- ### Launch BotBrowser with a Profile Source: https://github.com/botswin/botbrowser/blob/main/docs/guides/fingerprint/AUDIO.md Start BotBrowser with a specific profile to establish a clean baseline for deterministic noise protection. ```bash chromium-browser \ --bot-profile="/path/to/profile.enc" ``` -------------------------------- ### Install Latest BotBrowser (Windows PowerShell) Source: https://github.com/botswin/botbrowser/blob/main/INSTALLATION.md Installs the latest version of BotBrowser using a PowerShell script. Requires 7-Zip for extraction. ```powershell iwr -Uri "https://raw.githubusercontent.com/botswin/BotBrowser/main/scripts/install_botbrowser.ps1" -OutFile "$env:TEMP\install_botbrowser.ps1"; & "$env:TEMP\install_botbrowser.ps1" ```