anti-detect-browser

anti-detect-browser

啟動並管理具有真實裝置指紋的反偵測瀏覽器,適用於多帳號操作、網頁爬蟲、廣告驗證及 AI 代理自動化。當使用者需要執行多個具有不同身份的瀏覽器工作階段、管理持久性瀏覽器設定檔、跨帳號自動化任務,或建立需要瀏覽器指紋隔離的代理工作流程時使用。當使用者提及 antibrow、反偵測瀏覽器或指紋瀏覽器時也適用。

2星標
0分支
更新於 2026/6/23
SKILL.md
唯讀
名稱
anti-detect-browser
描述

啟動並管理具有真實裝置指紋的反偵測瀏覽器,適用於多帳號操作、網頁爬蟲、廣告驗證及 AI 代理自動化。當使用者需要執行多個具有不同身份的瀏覽器工作階段、管理持久性瀏覽器設定檔、跨帳號自動化任務,或建立需要瀏覽器指紋隔離的代理工作流程時使用。當使用者提及 antibrow、反偵測瀏覽器或指紋瀏覽器時也適用。

Anti-Detect Browser 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 等)可透過工具呼叫啟動、導航並與反偵測瀏覽器互動。
  • 品質保證與跨環境測試 - 測試您的網站在不同瀏覽器指紋、螢幕尺寸和裝置設定下的行為。

快速開始

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、音訊、字型、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 前往指定網址
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

基礎網址: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