YSbrowser Documentation

repository·main·Indexed 19 days ago

https://github.com/selfshore/ysbrowser

A privacy browser solution designed to bypass advanced fingerprinting and automation detection. YSbrowser allows developers to spoof browser, hardware, and network identities, providing tools to mimic specific brands like Brave, configure fingerprint seeds, manage WebRTC and IP privacy, and evade detection markers from tools like Selenium, Playwright, and Puppeteer.

Tokens
1.2K
Snippets
4
Records
10
Agent score
18%

What's inside YSbrowser

  1. Configure fingerprint seeds

    main

    The --fpseed parameter is a master seed that influences multiple fingerprint types including canvas, webgl, audio, speech, DOMRect, and fonts. Using the same seed ensures consistent browser fingerprints across sessions.

    Other specific seeds available include:

    • --webgl-seed
    • --canvas-seed
    • --quota-seed
    • --css-seed
    • --font-seed
    • --audio-seed
    • --svg-seed
    • --speech-seed
    • --rect-seed
    • --gpu-seed (available in v5.2+)
  2. Automation tool support and bypasses

    main

    YSbrowser is designed to bypass common automation detection markers. Key features include:

    • Eliminated Features: CDP detection, Selenium features, Playwright features (partial), and DrissionPage features.
    • Mouse Events: Fixed defects in CDP Input.dispatchMouseEvent.
    • Shadow DOM: Access closed Shadow DOM via opshadowRoot.
    • Crash Fixes: The --nocrash flag fixes iframe-related crashes in Playwright/Puppeteer caused by contentWindow.open.
    • Debugger Bypass: Renames debugger to debuging to evade detection.
  3. Run YSbrowser with basic configuration

    main

    To run YSbrowser, use the chrome command. For environment isolation, you must include the --user-data-dir flag. If you are on macOS, you may need to run xattr -cr YSbrowser.app first due to lack of signing.

    To see object logs in the console, include the openConsole feature (e.g., console.log("openConsole", {})).

    chrome --timezone=Asia/Hong_Kong --lang=zh-CN --accept-lang=zh-CN,en --fpseed=121e0opwlltx  --user-data-dir=./my_user_data 
  4. Configure WebRTC and IP privacy

    main

    To prevent WebRTC from leaking your real IP address, use the --webrtc-ip-policy flag.

    • --webrtc-ip-policy: Set to disabled to disable WebRTC or proxy to use a custom IP.
    • --webrtc-proxy-ip: Specifies the IP address to expose via WebRTC.
    --webrtc-ip-policy=disabled
    --webrtc-proxy-ip=127.0.0.1
  5. Configure geolocation settings

    main

    Control how the browser reports location.

    • --custom-geolocation: Sets latitude, longitude, and accuracy. Format: latitude,longitude,accuracy. Example: --custom-geolocation=110,220,70.
    • --block-geolocation: Blocks location reporting (available in v5.2+).
  6. Configure system and hardware identity

    main

    Spoof hardware and operating system details to match a specific profile.

    • --cpucores: Sets the number of CPU cores (e.g., 6, 8, 10, 12). This affects navigator.hardwareConcurrency.
    • --platformversion: Sets the system version (e.g., 15.4.1 for macOS or specific Windows build numbers).
    • --chrome-version: Specifies the Chrome version. Note: This is closely tied to Browser APIs; changing it arbitrarily may increase detection risk.
    • --custom-brand: Spoofs the browser brand (e.g., "Microsoft Edge"). If using a real brand, it is recommended to also provide a matching --user-agent.
  7. Configure network proxy and authentication

    main

    Set up network proxies using the --proxy-server flag and provide credentials via --proxy-auth.

    • --proxy-server: Supports http, socks4, and socks5 protocols. Format: --proxy-server=[protocol]://[address]:[port].
    • --proxy-auth: Format: --proxy-auth=username:password.
    # Example HTTP proxy
    --proxy-server=http://127.0.0.1:8080
    
    # Example Proxy Authentication
    --proxy-auth=username:password
  8. Configure browser language and localization

    main

    Control the browser language and HTTP request headers to influence speech recognition and localization fingerprints. It is recommended to keep both consistent.

    • --lang: Sets the browser language.
    • --accept-lang: Sets the HTTP Accept-Language header.
  9. Configure screen and display settings

    main

    Customize the screen dimensions and pixel density.

    • --custom-screen: Sets width, height, available width, and available height. Format: widthxheight,availwidthxavailheight. If availwidth/height are omitted, the browser handles them automatically. Example: 1792x1120,1792x1039.
    • --force-device-scale-factor: Sets the devicePixelRatio (physical to CSS pixel ratio). Example: 1 or 2.
  10. Simulate the Brave browser

    main

    You can mimic the Brave browser by setting the --custom-brand to Brave, specifying a --chrome-version, and enabling specific features like BraveAPI while disabling others like keyboardAPI and NetworkAPI.

    chrome --timezone=Asia/Hong_Kong --lang=zh-CN --accept-lang=zh-CN,en --fpseed=121e0opwlltx  --user-data-dir=./my_user_data --chrome-version=140.0.0.0 --custom-brand=Brave --enable-features=BraveAPI --disable-features=keyboardAPI,NetworkAPI