2026-05-20 21:39:12 +08:00

64 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# netabrowser-cli
> Neta 内部的反检测浏览器 CLI 工具。底层组合三套开源项目,对外暴露统一的命令式接口,给 NetaClaw Agent / geo 模块 / 电商自动化模块共享使用。
## 角色定位
```
geo 模块 / 电商自动化 / Agent
│ exec("netabrowser-cli ...") ← 命令行 + 短输出AI 调用省 token
netabrowser-cli (本包)
│ daemon 持久驻留,管理浏览器生命周期
┌──────────────────────────────────────────────┐
│ 三层叠加(解决养号反风控) │
│ │
│ ① patchright 去自动化痕迹patches
│ ② neta-chromium 指纹差异化(编译产物) │
│ ③ 自研补丁 国内平台(小红书/抖音等) │
└──────────────────────────────────────────────┘
真实 Chromium 进程(带代理 + 独立指纹 + 持久 profile
```
## 目录结构
```
packages/netabrowser-cli/
├── vendor/
│ ├── patchright/ # github.com/Kaliiiiiiiiii-Vinyzu/patchright
│ │ # 反自动化补丁生成器driver_patches
│ └── patchright-nodejs/ # github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs
│ # Node.js 客户端补丁
├── chromium/
│ └── win64/ # neta-chromium Windows 版(基于 fingerprint-chromium
│ # 来源github.com/adryfish/fingerprint-chromium
│ # 当前版本Chromium 144.0.7559.132-1.1
│ # ⚠️ chrome.exe / chrome.dll 不改名(内部硬编码引用)
│ # ⚠️ 397MB已 .gitignore不入版本库
└── src/ 待实现)
```
## 三个组件来源
| 组件 | 上游 | 作用 |
|------|------|------|
| **patchright** | https://github.com/Kaliiiiiiiiii-Vinyzu/patchright | Playwright 反检测补丁。去掉 `navigator.webdriver`、Runtime.enable、Console.enable 等 17+ 项自动化痕迹 |
| **patchright-nodejs** | https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs | patchright 的 Node.js 客户端 patches |
| **fingerprint-chromium**neta-chromium | https://github.com/adryfish/fingerprint-chromium | 基于 Ungoogled Chromium 的指纹浏览器。从 Chromium 内核改 canvas/webgl/GPU/字体/屏幕等硬件指纹 |
## 命名说明
对外品牌统一为 **neta-chromium** / **netabrowser-cli**。但**不会改 Chromium 内部 `chrome.exe` / `chrome.dll` 文件名**——Chromium 二进制内部硬编码引用这两个名字,重命名会直接破坏启动。"neta" 品牌只在 CLI 封装层和外层目录名上体现。
## 当前状态
- ✅ 第三方源码已整理到 vendor/
- ✅ Chromium 二进制已就位chromium/win64/
- ⏳ CLI 实现待开发src/、bin、daemon、commands、fingerprint preset 等)
- ⏳ Windows 安装包打包待集成