TopRank Skills

Home / Claw Skills / Git / GitHub / agent-browser-with-camoufox
Official OpenClaw rules 36%

agent-browser-with-camoufox

One-click deployment of camoufox anti-detection browser with modified agent-browser. Patches agent-browser to auto-detect camoufox/firefox from executable path instead of defaulting to chromium. Includes SkillsI integration for seamless browser automation workflows.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 agent-browser-with-camoufox 技能。 若已安装,则直接安装 agent-browser-with-camoufox 技能。

Overview

Skill Key
adastraabyssoque/agent-browser-with-camoufox
Author
adastraabyssoque
Source Repo
openclaw/skills
Version
-
Source Path
skills/adastraabyssoque/agent-browser-with-camoufox
Latest Commit SHA
e1a1671685b935dfd1ec965f4fd3321704264ecc

Extracted Content

SKILL.md excerpt

# agent-browser-with-camoufox

🚀 一键部署 camoufox + agent-browser 反检测浏览器工具链。

## 解决的问题

agent-browser 默认只支持 Chromium,但我们需要:
1. **反检测能力**: camoufox 能绕过 Bilibili、Cloudflare 等风控
2. **Firefox 支持**: 修改 agent-browser 自动识别 camoufox/firefox 路径
3. **一键部署**: 自动化繁琐的安装、修改、编译流程

## 概述

这个 skill 帮助用户快速部署:
- **camoufox**: 基于 Firefox 的反检测浏览器
- **agent-browser**: 浏览器自动化工具(修改后支持 camoufox)

## 关键修改点

agent-browser 默认使用 Chromium,需要修改以支持 camoufox/firefox:

1. **修改 browser.ts**: 自动检测 executablePath 中的 camoufox/firefox 关键字
2. **正确的 camoufox 路径**: `~/Library/Caches/camoufox/Camoufox.app/Contents/MacOS/camoufox` (macOS)
3. **重新编译**: 需要重新编译 Rust CLI 并替换 npm 包中的二进制

## 使用方法

### 一键安装

运行安装脚本:

```bash
bash ~/.openclaw/workspace/skills/camoufox-deploy/scripts/install.sh
```

这个脚本会自动完成:
1. 安装 uv (Python 包管理器)
2. 用 uv 安装 camoufox Python 包
3. 下载 camoufox 浏览器二进制
4. 安装 agent-browser npm 包
5. 修改 agent-browser 源码(自动检测 firefox/camoufox)
6. 重新编译 Rust CLI
7. 替换系统版本

### 手动步骤(如果需要)

#### 1. 安装 uv

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

#### 2. 安装 camoufox

```bash
uv pip install camoufox --system
```

#### 3. 下载 camoufox 浏览器

```bash
python3 -c "from camoufox.sync_api import Camoufox; Camoufox()"
```

或手动下载:
```bash
# macOS 路径
~/Library/Caches/camoufox/Camoufox.app/Contents/MacOS/camoufox
```

#### 4. 安装 agent-browser

```bash
npm install -g agent-browser
```

#### 5. 找到并修改 browser.ts

找到 agent-browser 的源码目录:

```bash
# 全局安装位置
npm root -g
cd $(npm root -g)/agent-browser

# 或克隆源码
git clone https://github.com/browser-use/agent-browser.git
cd agent-browser
```

修改 `src/browser.ts` 中的 `getBrowserType` 函数:

```typescript
private getBrowserType(executablePath: string): 'chromium' | 'firefox' {
  const lower...

README excerpt

# Camoufox Deploy

一键部署 camoufox + agent-browser 反检测浏览器工具链。

## 快速开始

### 一键安装

```bash
bash ~/.openclaw/workspace/skills/camoufox-deploy/scripts/install.sh
```

### 手动安装

如果一键安装遇到问题,可以按以下步骤手动安装:

#### 1. 安装依赖

```bash
# 安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 安装 camoufox
uv pip install camoufox --system

# 下载 camoufox 浏览器
python3 -c "from camoufox.sync_api import Camoufox; Camoufox()"
```

#### 2. 安装并修改 agent-browser

```bash
# 安装 agent-browser
npm install -g agent-browser

# 找到安装位置
AGENT_BROWSER_PATH=$(npm root -g)/agent-browser
echo $AGENT_BROWSER_PATH
```

#### 3. 修改源码

编辑 `$AGENT_BROWSER_PATH/src/browser.ts`,找到 `getBrowserType` 函数并修改为:

```typescript
private getBrowserType(executablePath: string): 'chromium' | 'firefox' {
  const lowerPath = executablePath.toLowerCase();
  if (lowerPath.includes('firefox') || lowerPath.includes('camoufox')) {
    return 'firefox';
  }
  return 'chromium';
}
```

#### 4. 重新编译

```bash
cd $AGENT_BROWSER_PATH
npm install
npm run build
```

## 使用方法

### 使用 camoufox 路径运行

```bash
# macOS
agent-browser --executable-path ~/Library/Caches/camoufox/Camoufox.app/Contents/MacOS/camoufox

# Linux
agent-browser --executable-path ~/.cache/camoufox/camoufox
```

### 在代码中使用

```typescript
import { AgentBrowser } from 'agent-browser';

const browser = new AgentBrowser({
  executablePath: '/Users/YOUR_USERNAME/Library/Caches/camoufox/Camoufox.app/Contents/MacOS/camoufox',
  headless: false
});

await browser.goto('https://example.com');
```

## 关键路径

| 组件 | macOS 路径 |
|------|-----------|
| camoufox | `~/Library/Caches/camoufox/Camoufox.app/Contents/MacOS/camoufox` |
| agent-browser | `$(npm root -g)/agent-browser` |

## 故障排除

### camoufox 未找到

```bash
# 确认路径
ls -la ~/Library/Caches/camoufox/Camoufox.app/Contents/MacOS/camoufox

# 手动下载
python3 -c "from camoufox.sync_api import Camoufox; Camoufox()...

Related Claw Skills