Chromix README

项目的 README,来自 github.com/xiaozhou26/Chromix。合并为一个 markdown 文件:README.md。

Chromix

English | 简体中文

PyPI npm License Docker Release

A configurable Chromium browser for automation, compatibility testing, and reproducible browser-identity experiments.

Chromix combines source-level Chromium patches with Python and Node.js SDKs. Use familiar Playwright objects, keep a stable profile across sessions, and configure language, timezone, display, and other browser-visible properties from one launch configuration. A separate Node entry point supports Puppeteer.

Project website · Download browser · Feature guide (中文) · Flag reference · Build guide · Report an issue

See Chromix

Chromix project website preview

Project website walkthrough: language switching, Python/Node/Docker examples and the feature FAQ. These are recordings of the Chromix website, separate from browser-engine or detection-test results.

Chromix website interaction demo

Watch the WebM video · Mobile screenshot · Open the website

At a glance

Capability What you can do Details
Python + Node automation Launch Chromix through Playwright; use Puppeteer from Node Python, Node
Persistent profiles Retain cookies/localStorage and reuse a fingerprint seed Profile example
Browser identity Configure UA, platform, locale, timezone, hardware and display properties Public flags
Proxy-aware configuration Use HTTP/HTTPS/SOCKS proxies and optionally derive locale/timezone through GeoIP Proxy example
Rendering and media policies Configure native GPU policy, fonts, audio and codec restrictions Backend policies
Input helpers Add mouse, typing and scrolling timing with humanize SDK feature details
Encrypted cookie transfer Export/import cookies between explicitly selected active contexts Cookie migration
Portable distribution Use a release ZIP or a Linux amd64/arm64 container Downloads, Docker

A persona is the browser identity configuration used for a launch. Its reported values, actual browser behavior, and underlying device capabilities have separate verification requirements. Chromix tracks those boundaries in FINGERPRINT_STATUS.md; website-specific detection outcomes depend on more than browser configuration.

Quick start

Choose a language below. The SDK resolves a locally configured executable first; otherwise it downloads and caches the browser selected by its configured release channel.

The SDK's latest channel is a pinned mapping, separate from GitHub's Latest release. To use Linux v155.0.8059.39 before the new SDK is published, download its package and set CLOAKBROWSER_BINARY_PATH. The Docker image remains at 154.0.8037.97 for both architectures. Updating an SDK does not replace an explicitly configured browser.

Python

Requires Python 3.8+ according to the package metadata; your Playwright version must also support your Python version.

python -m pip install chromix playwright

On Linux, install Playwright's system dependencies if needed:

python -m playwright install-deps chromium
from chromix import launch

browser = launch(headless=True)
try:
    page = browser.new_page()
    page.goto("https://example.com")
    print(page.title())
finally:
    browser.close()

Use launch_async, launch_context or launch_persistent_context for other lifecycles. See the Python API guide. To use this checkout's SDK, install ./sdk/python in place of chromix.

Node.js / Playwright

Requires Node.js 18+ according to the package metadata; choose a compatible automation-driver version. The npm package is @xiaoxiaofeihh/chromix. The unscoped chromix name belongs to an unrelated project.

npm install @xiaoxiaofeihh/chromix playwright-core

Save as example.mjs, then run node example.mjs:

import { launch } from "@xiaoxiaofeihh/chromix";

const browser = await launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.goto("https://example.com");
  console.log(await page.title());
} finally {
  await browser.close();
}

Node.js / Puppeteer

npm install @xiaoxiaofeihh/chromix puppeteer-core

Use the separate driver entry point:

import { launch } from "@xiaoxiaofeihh/chromix/puppeteer";

const browser = await launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.goto("https://example.com");
  console.log(await page.title());
} finally {
  await browser.close();
}

Driver-specific options and context ownership are explained in the Node API guide. Python provides Playwright integration.

Docker / Linux

The published Docker release provides 154.0.8037.97 for both amd64 and arm64 under latest and 154.0.8037.97. Docker's amd64 platform selects the release's linux-x64 archive; arm64 selects linux-arm64.

docker pull ghcr.io/xiaozhou26/chromix:latest
docker run --rm ghcr.io/xiaozhou26/chromix:latest --version

latest selects the matching architecture at 154.0.8037.97; the existing 154.0.8037.57 tag remains unchanged for both architectures. The image is a non-root browser CLI; SDKs and a remote browser service are separate. See Docker setup and commands for checksum verification, sandbox requirements and headless use. The image build reuses release binaries rather than compiling Chromium again.

Common configurations

Persistent profiles

Use one user-data directory per identity. The SDK stores a seed with the profile so subsequent launches reuse it.

from chromix import launch_persistent_context

context = launch_persistent_context(
    "./profiles/demo",
    headless=False,
    locale="en-US",
    timezone="America/New_York",
)
try:
    page = context.new_page()
    page.goto("https://example.com")
finally:
    context.close()

Node uses launchPersistentContext({ userDataDir: "./profiles/demo", ... }). Keep concurrent browser processes on separate profile directories. For reproducible nonpersistent tests, pass an explicit args=["--fingerprint=42"] (Python) or args: ["--fingerprint=42"] (Node).

Proxy and GeoIP

import os
from chromix import launch

browser = launch(
    proxy=os.environ["CHROMIX_PROXY"],
    geoip=True,
    locale="en-US",
    headless=True,
)
try:
    page = browser.new_page()
    page.goto("https://example.com")
finally:
    browser.close()

Set CHROMIX_PROXY to your proxy URL, for example http://user:[email protected]:8080. Explicit locale/timezone settings take precedence over GeoIP results. GeoIP makes a metadata request through the effective proxy.

Authenticated SOCKS5 TCP requires a matching patched Chromix binary. WebRTC address presentation and actual traffic routing are separate: changing a candidate IP does not create a UDP tunnel. Read the WebRTC/proxy contract before relying on a particular network route.

Input timing and extensions

Add humanize=True in Python or humanize: true in Node to enable the SDK's input helpers. Python accepts extension_paths; Node uses extensionPaths. Consult the SDK guides for the supported operations, presets and driver-specific restrictions. Input helpers do not establish website-specific detection guarantees.

Downloads and platforms

Download ZIPs and their checksum files from the same release. Linux x64 / ARM64 downloads use v155.0.8059.39. Windows x64 / ARM64 remain at v154.0.8037.97, and macOS x64 / ARM64 remain at v154.0.8037.57. Docker is unchanged at 154.0.8037.97 for both architectures.

Target Archive Manual launcher inside the extracted directory
Windows x64 chromix-win-x64.zip chromix/chromix.cmd
Windows ARM64 chromix-win-arm64.zip chromix/chromix.cmd
Linux x64 chromix-linux-x64.zip chromix/chromix
Linux ARM64 chromix-linux-arm64.zip chromix/chromix
macOS Intel chromix-mac-x64.zip chromix/chromix
macOS Apple Silicon chromix-mac-arm64.zip chromix/chromix

Platforms build and publish independently. Windows ARM64 cross-compiles on windows-2022 and uses windows-11-arm for native verification. macOS bundles have no Developer ID distribution signature or notarization. Linux needs compatible system libraries and a working Chromium sandbox.

Checksum files may be platform-specific. For v155.0.8059.39, Linux x64 uses SHA256SUMS-linux-x64, and Linux ARM64 uses SHA256SUMS-linux-arm64; the release also provides a main SHA256SUMS. Windows x64 uses SHA256SUMS-win-x64; its ZIP is also listed in the same release's main SHA256SUMS. Windows ARM64 uses SHA256SUMS-win-arm64. Select the file containing your exact ZIP name; do not assume the generic manifest lists every platform.

Linux x64 example, after downloading both files:

set -eu
archive=chromix-linux-x64.zip
awk -v name="$archive" '$2 == name || $2 == "*" name { print; count++ } END { if (count != 1) exit 1 }' SHA256SUMS-linux-x64 > SHA256SUMS.selected
sha256sum -c SHA256SUMS.selected
unzip "$archive" -d chromix-linux-x64
./chromix-linux-x64/chromix/chromix --version

For Linux ARM64, change the archive/directory to chromix-linux-arm64 and the manifest to SHA256SUMS-linux-arm64. On macOS use shasum -a 256 -c and preserve framework symlinks and executable permissions. On Windows use PowerShell Get-FileHash -Algorithm SHA256 to compare against the matching manifest before Expand-Archive.

For Actions artifacts, first extract GitHub's outer ZIP, then verify the inner browser archive. Detailed candidate verification is in BUILDING.md.

Use a local browser binary

Set CLOAKBROWSER_BINARY_PATH in the same terminal as your SDK script. Keep the full extracted bundle next to the executable.

# Windows: actual executable, rather than the .cmd launcher
$env:CLOAKBROWSER_BINARY_PATH = "D:\chromix-win-x64\chromix\chrome.exe"
# Linux
export CLOAKBROWSER_BINARY_PATH="/absolute/path/chromix/chrome"

# macOS (use this assignment instead on a Mac)
export CLOAKBROWSER_BINARY_PATH="/absolute/path/chromix/Chromium.app/Contents/MacOS/Chromium"

Then use the usual SDK launch functions. This environment variable works in both SDKs. Python launch(executable_path=...) conflicts with the wrapper's own argument. Node's ordinary Playwright launches also accept launchOptions: { executablePath: "/absolute/path/to/chrome" } to bypass download; the Puppeteer entry point additionally accepts top-level executablePath. Measured-device launches have separate restrictions; see the Node guide.

Versions and download channels

Python SDK 152.0.7977.82.post5 and Node SDK 0.1.5 are published. Their stable / latest mappings are Linux x64 / ARM64 → v155.0.8059.39 and Windows x64 / ARM64 → v154.0.8037.97. macOS keeps stable v151.0.7922.173 and latest v152.0.7977.75. Earlier post4 / 0.1.4 packages retain Linux v154.0.8037.97; upgrade your SDK or select a verified local executable with CLOAKBROWSER_BINARY_PATH. Upgrade with python -m pip install --upgrade chromix or npm install @xiaoxiaofeihh/chromix@latest. SDK package versions remain separate from the browser version.

These are separate version sources:

Version source Version / target Meaning
main Linux / Windows source pins Chromium 154.0.8037.97 Main source configuration remains unchanged
Linux 155 build branch Chromium 155.0.8059.39 Independent release build; does not upgrade the source pins on main
main macOS source pin Chromium 154.0.8037.97 Build cache from upstream run 37654894671; existing published downloads remain unchanged until the new build is verified
Container latest / 154.0.8037.97 amd64 / arm64 154.0.8037.97 Both architectures use the same release; the old .57 tag is retained
SDK Linux x64 / ARM64 stable / latest v155.0.8059.39 Published in Python 152.0.7977.82.post5 / Node 0.1.5
SDK Windows x64 stable / latest v154.0.8037.97 Published in Python 152.0.7977.82.post3 / Node 0.1.3
SDK Windows ARM64 stable / latest v154.0.8037.97 Published in Python 152.0.7977.82.post4 / Node 0.1.4
SDK macOS stable v151.0.7922.173 Existing mapping retained; check asset availability
SDK macOS latest v152.0.7977.75 Existing mapping retained; check asset availability

Source pins are authoritative in build/ungoogled-revisions.psd1; channel mappings are in the Python and Node downloaders. CLOAKBROWSER_VERSION accepts a configured major or an exact four-part release version; an explicit channel takes precedence. Exact versions fail if the requested platform asset is absent. A source feature requires a browser built with the corresponding patches; an SDK update alone cannot add it to an older executable. The Windows ARM64 .97 package reuses the natively reverified 216-patch build; it does not include the new noise changes in the current source.

The Linux v155.0.8059.39 release reuses the original 226-patch packages for both architectures. Native CI gates passed, but fullAcceptance=false and 164 acceptance gaps remain. There was no dedicated new pixel-noise validation; prior-patch noise coverage remains unknown. These results do not establish full acceptance or pixel-noise effectiveness.

Feature scope and verification

For a verified local executable, run a focused smoke check:

python3 tools/fingerprint_smoke.py \
  --browser /absolute/path/chromix/chrome \
  --platform linux --locale en-US \
  --output /tmp/chromix-fingerprint-smoke.json

This requires Python Playwright and uses local test pages. It does not download a browser.

Troubleshooting

Symptom First checks
SDK downloads an older browser or returns 404 Check configured channels and release Assets; use CLOAKBROWSER_BINARY_PATH for the exact build you downloaded
A flag has no visible effect Confirm the executable version and relevant source feature; distinguish profile settings from native device capabilities
Linux fails to start Check system libraries, sandbox support, user permissions and shared memory in containers
Headed mode fails on a server Use headless mode or configure a display server
Proxy/GeoIP fails Check credentials, DNS, protocol and metadata reachability through that proxy; explicit locale/timezone can avoid a GeoIP dependency
Windows crashes on reload Follow Windows crash diagnostics and record the exact executable/build
A GitHub build fails Reuse the latest verified uploaded file-tree checkpoint; see BUILDING.md for exact run/stage/attempt/asset inputs

When reporting an issue, include OS/architecture, browser version, SDK version, launch options with credentials removed, build/run link, and a minimal reproduction.

Documentation map

Goal Read
Choose a feature and configure it Feature guide (中文)
Use Python / async contexts Python SDK
Use Node / Playwright / Puppeteer Node SDK
Run a Linux container Docker
Look up native browser switches Fingerprint flags
Understand rendering and media behavior Backend policy, Canvas, GPU
Evaluate device templates and measured records Device pool
Inspect verification status Status, coverage, acceptance
Compare CloakBrowser-compatible APIs Functionality comparison, implementation history
Build, resume, package or publish BUILDING.md

Build and contribute

The repository pins Chromium, ungoogled core and platform overlays, then applies the Chromix stack from patches/series. See BUILDING.md for per-platform dependencies and staged GitHub Actions builds.

Windows needs Visual Studio C++ tools and Windows SDK 10.0.28000.0, including Debugging Tools, plus Python, Git, PowerShell 7 and 7-Zip. Linux and macOS require their respective Chromium toolchains. Build caches restore source and intermediate outputs; Ninja recompiles outputs affected by changed inputs.

pwsh build/windows/build.ps1 -WorkDir D:\chromix-build -Jobs 8
# Continue with the same work directory:
pwsh build/windows/build.ps1 -WorkDir D:\chromix-build -Resume -Jobs 8

Useful development checks, with the appropriate development dependencies installed:

python3 tools/check_patches.py
python3 -m unittest discover -s tools/tests -v
npm --prefix sdk/node test
git diff --check
patches/       Chromium source patches and version-specific overrides
build/         Platform preparation, staged compilation and packaging
docker/        Release-based Linux container
site/          GitHub Pages project website
sdk/           Python and Node automation wrappers
tools/         Build validation, diagnostics and regression tests
docs/          Feature guides, design notes and acceptance boundaries
assets/fonts/  Font assets and provenance

License

Chromix's original code, patch integration and SDKs use the BSD 3-Clause License. Chromium, third-party components and fonts retain their own terms; see font provenance. Referenced projects retain their own branding and licensing.

Issues · Releases · LINUX DO

Chromix (xiaozhou26/Chromix)

正在搜索数据库…

这是什么东西?一个基于 Chromium 的浏览器构建,能让 JavaScript 可见的各项特征在每次启动时呈现一套连贯一致的浏览器人设,并配有轻量的 Python 和 Node SDK 用于自动化。官方声明的用途包括:浏览器自动化、兼容性测试、隐私研究,以及受控的指纹实验。
它是一个需要安装的浏览器,还是我要加到自己脚本里的库?两者都是:你得到一个按操作系统打包的便携浏览器,外加薄薄的 Python 和 Node SDK 封装,launch() 返回的是标准的 Playwright Browser 和 BrowserContext 对象,所以脚本仍然用熟悉的 Playwright 风格 API。
怎么把它跑起来?先装 SDK——Python 用 pip install chromix,Node 用 npm install @xiaoxiaofeihh/chromix——然后调用 chromix.launch():它会自动下载匹配的浏览器包。设置 CLOAKBROWSERBINARYPATH 可以跳过下载,直接使用本地的可执行文件。
我得自己编译 Chromium 吗,还是有现成的构建?只需要一个 Python 或 Node 运行环境——正常使用无需任何编译。GitHub Releases 上提供现成的 Windows x64、Linux x64/arm64、macOS x64/arm64 ZIP 包,并附带 SHA256SUMS 用于校验;从源码构建是可选的,但非常费劲,在 Windows 上大约需要 120 GB 磁盘空间。
用定制浏览器构建真的能让我的自动化检测不出来吗?不能——README 明确警告定制浏览器并不能让自动化无法被检测:网络信誉、行为模式和账号历史仍会暴露你。此外覆盖面还有未补齐的缺口,比如屏幕/布局、字体来源、CPU/内存、媒体后端以及底层网络传输。
它就是原版 Chromium 吗,还是为了隐私做过改造?做过改造:它基于锁定的 ungoogled-chromium 源码编译,在 Chromium 152 上叠加了一套经过审阅的 110 个补丁,并且隐私研究是其声明的用途之一。可选的 GeoIP 查询能让语言区域、时区和声明的 WebRTC 地址与代理出口保持一致。
它采用什么许可证?Chromix 自身的代码、补丁集成和 SDK 采用 BSD 3-Clause;捆绑的 Chromium、第三方组件和字体资源则保留其上游的许可证和条款。
我现有的 Playwright 脚本还能用吗?通常可以,只需改一行:SDK 接口与 CloakBrowser 兼容,现有的基于 Playwright 的 Python 和 Node 脚本一般只要改一下导入语句就能迁移。Python 封装返回的是真正的 Playwright Browser 和 BrowserContext 对象;Node SDK 在 playwright-core 上做了对应实现,采用 camelCase 命名。
浏览器人设到底能改变哪些东西?User agent、平台、语言区域、时区、屏幕、硬件、媒体、canvas、WebGL、WebGPU、音频、字体,以及其他 JavaScript 可见的特征。每个特征的验证状态和已知的跨接口缺口都记录在 FINGERPRINTSTATUS.md 里。
同一个配置在多次运行时能保持相同的身份吗?可以——持久化 SDK 配置会复用同一个指纹种子,从而在多个会话中保持稳定身份;非持久化启动则使用随机的 32 位种子。命令行开关还支持完全可复现的测试人设。
安装 Node SDK 有什么坑?有:不带 scope 的 npm 包名 chromix 属于另一个不相干的项目,所以要安装并导入带 scope 的包 @xiaoxiaofeihh/chromix。在 PyPI 上,包名就简单地叫 chromix。
大小
93.5 MB
星标
519
时长
3个月
提交 · 90 天