anti-detect-browser

anti-detect-browser

启动和管理反检测浏览器,使用独特的真实设备指纹,用于多账户操作、网页抓取、广告验证和AI代理自动化。当用户需要运行多个具有不同身份的浏览器会话、管理持久化浏览器配置文件、跨账户自动化任务或构建需要浏览器指纹隔离的代理工作流时使用。当用户提到 antibrow、反检测浏览器或指纹浏览器时也使用。

2Star
0Fork
更新于 2026/6/23
SKILL.md
只读
名称
anti-detect-browser
描述

启动和管理反检测浏览器,使用独特的真实设备指纹,用于多账户操作、网页抓取、广告验证和AI代理自动化。当用户需要运行多个具有不同身份的浏览器会话、管理持久化浏览器配置文件、跨账户自动化任务或构建需要浏览器指纹隔离的代理工作流时使用。当用户提到 antibrow、反检测浏览器或指纹浏览器时也使用。

反检测浏览器 SDK

通过标准 Playwright API 启动带有真实设备指纹的 Chromium 实例。每个浏览器获得唯一且一致的数字身份——反机器人系统无法检测。

  • npm 包:anti-detect-browser
  • 控制台:https://antibrow.com
  • REST API 基础:https://antibrow.com/api/v1/
  • 文档:https://antibrow.com/docs

使用场景

  • 多账户管理 - 在同一台机器上运行数十个社交媒体、电商或广告账户而不被关联。每个浏览器配置文件拥有自己的指纹、Cookie 和存储。
  • 网页抓取与数据收集 - 在抓取会话间轮换指纹以避免检测和指纹-IP关联封禁。
  • 广告验证与竞争情报 - 以不同用户配置文件查看广告和内容,跨地区和设备类型。
  • 社交媒体自动化 - 管理多个账户,使用持久化配置文件,浏览器重启后数据保留。
  • 电商运营 - 使用完全隔离的浏览器环境操作多个卖家/买家账户。
  • AI代理浏览器控制 - 作为 MCP 服务器运行,使 AI 代理(Claude、GPT 等)能够通过工具调用启动、导航和与反检测浏览器交互。
  • QA与跨环境测试 - 测试您的网站在不同浏览器指纹、屏幕尺寸和设备配置下的表现。

快速开始

npm install anti-detect-browser
import { AntiDetectBrowser } from 'anti-detect-browser'

// 在 https://antibrow.com 获取您的 API 密钥
const ab = new AntiDetectBrowser({ key: 'your-api-key' })

const { browser, page } = await ab.launch({
  fingerprint: { tags: ['Windows 10', 'Chrome'] },
  profile: 'my-account-01',
  proxy: 'http://user:pass@host:port',
})

// 从这里开始使用标准 Playwright API — 零学习成本
await page.goto('https://example.com')
await browser.close()

核心概念

配置文件 — 持久化浏览器身份

配置文件保存 Cookie、localStorage 和会话数据,跨启动持久化。相同的配置文件名称 = 下次启动时相同的存储状态。

// 首次启动 — 新会话
const { page } = await ab.launch({ profile: 'shop-01' })
await page.goto('https://shop.example.com/login')
// ... 登录 ...
await browser.close()

// 稍后 — 会话恢复,已登录
const { page: p2 } = await ab.launch({ profile: 'shop-01' })
await p2.goto('https://shop.example.com/dashboard') // 无需登录

指纹 — 来自云端的真实设备数据

每次启动获取从实际设备收集的真实指纹。超过 30 个类别(Canvas、WebGL、Audio、Fonts、WebRTC、WebGPU 等),500 多个独立参数。

// Windows Chrome,版本 130+
await ab.launch({
  fingerprint: { tags: ['Windows 10', 'Chrome'], minBrowserVersion: 130 },
})

// Mac Safari
await ab.launch({
  fingerprint: { tags: ['Apple Mac', 'Safari'] },
})

// 移动端 Android
await ab.launch({
  fingerprint: { tags: ['Android', 'Mobile', 'Chrome'] },
})

可用的过滤标签:Microsoft WindowsApple MacAndroidLinuxiPadiPhoneEdgeChromeSafariFirefoxDesktopMobileWindows 7Windows 8Windows 10

视觉标识 — 一目了然区分窗口

同时运行多个浏览器时,每个窗口获得浮动标签、标题前缀和独特的主题颜色。

await ab.launch({
  profile: 'twitter-main',
  label: '@myhandle',       // 浮动标签 + 窗口标题
  color: '#e74c3c',         // 独特的窗口边框颜色
})

代理集成

通过不同的代理路由每个浏览器,用于地理定位或 IP 轮换。

await ab.launch({
  proxy: 'socks5://user:pass@us-proxy.example.com:1080',
  fingerprint: { tags: ['Windows 10', 'Chrome'] },
  profile: 'us-account',
})

实时视图 — 实时观看无头浏览器

https://antibrow.com 控制台监控无头会话。用于调试 AI 代理操作或让团队成员观察。

const { liveView } = await ab.launch({
  headless: true,
  liveView: true,
})

console.log('实时观看:', liveView.viewUrl)
// 分享此 URL — 任何有权限的人都可以看到浏览器屏幕

注入到现有 Playwright 设置

已有 Playwright 脚本?无需更改工作流程即可添加指纹。

import { chromium } from 'playwright'
import { applyFingerprint } from 'anti-detect-browser'

const browser = await chromium.launch()
const context = await browser.newContext()

await applyFingerprint(context, {
  key: 'your-api-key',
  fingerprint: { tags: ['Windows 10', 'Chrome'] },
  profile: 'my-profile',
})

const page = await context.newPage()
await page.goto('https://example.com')

MCP 服务器模式 — 用于 AI 代理

作为 MCP 服务器运行,使 AI 代理能够通过工具调用启动和控制指纹浏览器。

{
  "mcpServers": {
    "anti-detect-browser": {
      "command": "npx",
      "args": ["anti-detect-browser", "--mcp"],
      "env": { "ANTI_DETECT_BROWSER_KEY": "your-api-key" }
    }
  }
}

可用工具:

工具 功能
launch_browser 启动一个新的指纹浏览器会话
close_browser 关闭一个正在运行的会话
navigate 导航到 URL
screenshot 捕获当前屏幕
click / fill 与页面元素交互
evaluate 在页面上运行 JavaScript
get_content 从页面或特定元素提取文本
start_live_view 将浏览器屏幕流式传输到 https://antibrow.com 控制台
stop_live_view 停止实时流式传输
list_sessions 列出所有正在运行的浏览器实例
list_profiles 列出所有保存的配置文件

工作流示例

多账户社交媒体

const accounts = [
  { profile: 'twitter-1', label: '@brand_main', color: '#1DA1F2' },
  { profile: 'twitter-2', label: '@support', color: '#FF6B35' },
  { profile: 'twitter-3', label: '@personal', color: '#6C5CE7' },
]

for (const acct of accounts) {
  const { page } = await ab.launch({
    fingerprint: { tags: ['Windows 10', 'Chrome'] },
    proxy: getNextProxy(),
    ...acct,
  })
  await page.goto('https://twitter.com')
}

带指纹轮换的抓取

for (const url of urlsToScrape) {
  const { browser, page } = await ab.launch({
    fingerprint: { tags: ['Desktop', 'Chrome'], minBrowserVersion: 125 },
    proxy: rotateProxy(),
  })
  await page.goto(url)
  const data = await page.evaluate(() => document.body.innerText)
  saveData(url, data)
  await browser.close()
}

带实时视图的无头监控

const { page, liveView } = await ab.launch({
  headless: true,
  liveView: true,
  profile: 'price-monitor',
  fingerprint: { tags: ['Windows 10', 'Chrome'] },
})

// 与团队分享实时视图 URL
console.log('控制台:', liveView.viewUrl)

while (true) {
  await page.goto('https://shop.example.com/product/123')
  const price = await page.textContent('.price')
  if (parseFloat(price) < targetPrice) notify(price)
  await page.waitForTimeout(60_000)
}

REST API

基础 URL:https://antibrow.com/api/v1/ — 所有端点需要 Authorization: Bearer <api-key> 头。

指纹

方法 端点 描述
GET /fingerprints/fetch 获取符合过滤条件的指纹。返回 { dataUrl } — 下载预签名 URL 以获取完整指纹数据。
GET /fingerprints/versions 列出可用的浏览器版本

/fingerprints/fetch 的查询参数:tagsidminBrowserVersionmaxBrowserVersionminWidthmaxWidthminHeightmaxHeight

配置文件

方法 端点 描述
GET /profiles 列出所有配置文件
POST /profiles 创建新配置文件(服务器分配随机指纹)。返回配置文件信息,包括用于立即下载指纹数据的 dataUrl
GET /profiles/:name 获取配置文件详情,包含用于下载指纹数据的 dataUrl
DELETE /profiles/:name 删除配置文件

POST /profiles 请求体:

{ "name": "my-profile", "tags": ["Windows 10", "Chrome"] }

POST /profiles 响应(201):

{
  "name": "my-profile",
  "tags": ["Windows 10", "Chrome"],
  "ua": "Mozilla/5.0 ...",
  "browserVersion": 131,
  "width": 1920,
  "height": 1080,
  "createdAt": "2025-01-01T00:00:00.000Z",
  "dataUrl": "https://r2.example.com/fingerprints/..."
}

dataUrl 是一个预签名的 R2 URL(有效期为 10 分钟),指向完整的指纹 JSON 数据(约 9MB)。直接下载 — 无需额外 API 调用。

开始使用

  1. https://antibrow.com 注册(免费套餐:2 个浏览器配置文件)
  2. 从控制台获取您的 API 密钥
  3. npm install anti-detect-browser
  4. 启动您的第一个反检测浏览器

完整文档:https://antibrow.com/docs