CAPTCHA Relay v2
Solve CAPTCHAs by relaying them to a human. Two modes available.
Modes
Screenshot Mode (default) — No infrastructure needed
Grid overlay screenshot → send image to human via Telegram → human replies with cell numbers → inject clicks.
- - Zero setup beyond the skill itself. No Tailscale, no tunnels, no relay server.
- Works for any CAPTCHA type (reCAPTCHA, hCaptcha, sliders, text, etc.)
- Uses
sharp for image processing + CDP for screenshots and click injection.
CODEBLOCK0
CODEBLOCK1
Token Relay Mode — Requires network access
Detects CAPTCHA type + sitekey → serves real widget on relay page → human solves natively → token injected via CDP.
- - Requires Tailscale or a tunnel (localtunnel/cloudflared) so the human's device can reach the relay server.
- Produces a proper CAPTCHA token — more reliable for reCAPTCHA v2, hCaptcha, Turnstile.
- Best when you have Tailscale already set up.
CODEBLOCK2
CODEBLOCK3
When to Use Each
| Scenario | Mode |
|---|
| Quick & easy, no setup | INLINECODE1 |
| Any CAPTCHA type (sliders, text, etc.) |
screenshot |
| Known CAPTCHA with sitekey (reCAPTCHA, hCaptcha, Turnstile) |
relay |
| Tailscale already configured |
relay |
| No network access to host |
screenshot |
CLI Flags
| Flag | Default | Description |
|---|
| INLINECODE6 | INLINECODE7 | Select solving mode |
| INLINECODE8 |
— | Alias for
--mode screenshot |
|
--no-inject | inject | Return token without injecting into browser |
|
--no-tunnel | tunnel | Skip tunnel, use local/Tailscale IP (relay mode) |
|
--timeout N | 120 | Timeout in seconds |
|
--cdp-port N | 18800 | Chrome DevTools Protocol port |
Agent Workflow
Screenshot mode (simplest)
- 1. Call INLINECODE14
- Send
capture.imagePath to human via message tool with INLINECODE17 - Human replies with cell numbers (e.g. "1,3,5,7")
- Call
injectGridClicks(cdpPort, capture, selectedCells) to click those cells
Relay mode
- 1. Call
solveCaptcha({ useTunnel: false }) (Tailscale) or solveCaptcha() (tunnel) - Send
result.relayUrl to human via message tool - Wait — resolves when human completes the CAPTCHA
- Token is auto-injected; continue automation
Requirements
- - Chrome/Chromium with INLINECODE23
- Node.js 18+ and
npm install (deps: ws, sharp) - Relay mode only: Tailscale or internet for tunnel
CAPTCHA Relay v2
通过将验证码转发给人类来破解验证码。提供两种模式。
模式
截图模式(默认)——无需基础设施
网格覆盖截图 → 通过Telegram将图片发送给人类 → 人类回复单元格编号 → 注入点击操作。
- - 零配置,仅需技能本身。无需Tailscale、无需隧道、无需中继服务器。
- 适用于任何验证码类型(reCAPTCHA、hCaptcha、滑块、文本等)
- 使用sharp进行图像处理 + CDP进行截图和点击注入。
bash
node index.js # 截图模式(默认)
node index.js --mode screenshot # 显式指定
node index.js --screenshot # 旧版别名
js
const { solveCaptchaScreenshot } = require(./index);
const capture = await solveCaptchaScreenshot({ cdpPort: 18800 });
// capture.imagePath — 发送给人类的带注释截图
// capture.prompt — 给人类的文本提示
令牌中继模式——需要网络访问
检测验证码类型 + sitekey → 在中继页面上提供真实控件 → 人类原生破解 → 通过CDP注入令牌。
- - 需要Tailscale或隧道(localtunnel/cloudflared),以便人类的设备能够访问中继服务器。
- 生成正确的验证码令牌——对于reCAPTCHA v2、hCaptcha、Turnstile更可靠。
- 如果已配置Tailscale,效果最佳。
bash
node index.js --mode relay # 使用localtunnel
node index.js --mode relay --no-tunnel # 使用Tailscale/LAN
js
const { solveCaptcha } = require(./index);
const result = await solveCaptcha({ cdpPort: 18800, useTunnel: false });
// result.relayUrl — 发送给人类的URL
// result.token — 已破解的验证码令牌
何时使用哪种模式
| 场景 | 模式 |
|---|
| 快速简便,无需配置 | screenshot |
| 任何验证码类型(滑块、文本等) |
screenshot |
| 已知sitekey的验证码(reCAPTCHA、hCaptcha、Turnstile) | relay |
| 已配置Tailscale | relay |
| 无法访问主机网络 | screenshot |
CLI参数
| 参数 | 默认值 | 描述 |
|---|
| --mode screenshot\ | relay | screenshot | 选择破解模式 |
| --screenshot |
— | --mode screenshot的别名 |
| --no-inject | inject | 返回令牌,不注入浏览器 |
| --no-tunnel | tunnel | 跳过隧道,使用本地/Tailscale IP(中继模式) |
| --timeout N | 120 | 超时时间(秒) |
| --cdp-port N | 18800 | Chrome DevTools协议端口 |
代理工作流程
截图模式(最简单)
- 1. 调用 solveCaptchaScreenshot({ cdpPort })
- 通过 message 工具将 capture.imagePath 和 capture.prompt 发送给人类
- 人类回复单元格编号(例如 1,3,5,7)
- 调用 injectGridClicks(cdpPort, capture, selectedCells) 点击这些单元格
中继模式
- 1. 调用 solveCaptcha({ useTunnel: false })(Tailscale)或 solveCaptcha()(隧道)
- 通过 message 工具将 result.relayUrl 发送给人类
- 等待——人类完成验证码后解析
- 令牌自动注入;继续自动化操作
要求
- - 使用 --remote-debugging-port=18800 启动的 Chrome/Chromium
- Node.js 18+ 并执行 npm install(依赖:ws, sharp)
- 仅中继模式: Tailscale 或互联网用于隧道