johnalbertini14-glitch/openclaw-skills / skills/0xclanky/captcha-relay
captcha-relay
FlaggedHuman-in-the-loop CAPTCHA solving with two modes: screenshot (default, zero infrastructure) and token relay (requires network access). Screenshot mode captures the page with a grid overlay, sends it to the human, and injects clicks based on their reply. Token relay mode detects CAPTCHA type + sitekey, serves the real widget on a relay page for native solving, and injects the token via CDP.
| File | Kind | Size |
|---|---|---|
| ARCHITECTURE.md | markdown | 4.2 KB |
| README.md | markdown | 4.0 KB |
| SKILL.md | skill md | 3.6 KB |
| TAILSCALE.md | markdown | 3.0 KB |
| _meta.json | config | 458 B |
| browser-relay-cli.js | script | 981 B |
| fallback/screenshot.js | script | 5.2 KB |
| index.js | script | 5.4 KB |
| lib/browser-relay.js | script | 7.9 KB |
| lib/cdp.js | script | 2.8 KB |
| lib/detect.js | script | 2.8 KB |
| lib/inject.js | script | 4.5 KB |
| lib/server.js | script | 2.6 KB |
| lib/templates/browser-relay.html | other | 7.5 KB |
| lib/templates/hcaptcha.html | other | 1.8 KB |
| lib/templates/recaptcha-v2.html | other | 1.9 KB |
| lib/templates/turnstile.html | other | 1.8 KB |
| lib/tunnel.js | script | 4.2 KB |
| package-lock.json | manifest | 17.2 KB |
| package.json | manifest | 443 B |
README.md
View on GitHub# captcha-relay
Human-in-the-loop CAPTCHA solving. No third-party solving services. No API keys. Just you and your phone.
## Two Modes
### πΈ Screenshot Mode (default) β Zero infrastructure
Captures the CAPTCHA as a screenshot with a numbered grid overlay, sends it to you (via Telegram, etc.), you reply with cell numbers, and clicks are injected into the browser.
**Works for any CAPTCHA type.** No network setup needed.
```bash
node index.js # screenshot mode is the default
node index.js --mode screenshot # explicit
```
### π Token Relay Mode β Native solving
Detects the CAPTCHA type and sitekey, serves the real CAPTCHA widget on a relay page, you solve it natively on your phone, and the token is injected back via CDP.
**Requires network access** (Tailscale or tunnel) so your phone can reach the relay server.
```bash
node index.js --mode relay # with localtunnel
node index.js --mode relay --no-tunnel # with Tailscale/LAN
```
## Quick Start
### Screenshot Mode (easiest)
```bash
cd captcha-relay
npm install
# Launch Chrome with CDP:
chromium --remote-debugging-port=18800
# In another terminal:
node index.js
# β Outputs annotated screenshot path as JSON
# β Send image to human, get cell numbers back, inject clicks
```
### Token Relay Mode
**With Tailscale (recommended):**
```bash
# Install Tailscale on both your server and phone
# See TAILSCALE.md for details
node index.js --mode relay --no-tunnel
# β Outputs relay URL as JSON
# β Open URL on phone, solve CAPTCHA, token auto-injected
```
**With localtunnel:**
```bash
node index.js --mode relay
# β Creates public tunnel URL automatically
```
## Module API
```js
const { solveCaptcha, solveCaptchaScreenshot, injectGridClicks } = require('captcha-relay');
// Screenshot mode
const capture = await solveCaptchaScreenshot({ cdpPort: 18800 });
// capture.imagePath, capture.prompt, capture.rows, capture.cols
// Token relay mode
const result = await solveCaptcha({ cdpPort: 18800, useTunnel: false });
// result.relayUrl, result.token, result.solved
```
## CLI Options
| Flag | Description | Default |
|------|-------------|---------|
| `--mode screenshot\|relay` | Solving mode | `screenshot` |
| `--screenshot` | Alias for `--mode screenshot` | β |
| `--cdp-port N` | Chrome DevTools Protocol port | `18800` |
| `--timeout N` | Timeout in seconds | `120` |
| `--no-tunnel` | Skip tunnel, use local/Tailscale IP | off |
| `--no-inject` | Return token without injecting | off |
## How It Works
```
Screenshot Mode: Token Relay Mode:
Browser hits CAPTCHA Browser hits CAPTCHA
β β
Screenshot + grid overlay Detect type + sitekey via CDP
β β
Send image to human Start relay server (real widget)
β β
Human replies: "1,3,5" Generate URL β send to phone
β β
Inject clicks at grid cells Human solves CAPTCHA natively
β β
Automation continues β Token injected via CDP
β
Automation continues β
```
## Supported CAPTCHAs
| Type | Screenshot | Token Relay |
|------|-----------|-------------|
| reCAPTCHA v2 | β
| β
Tested |
| hCaptcha | β
| β
Supported |
| Cloudflare Turnstile | β
| β
Supported |
| Sliders, text, custom | β
| β |
## Network Setup (Relay Mode Only)
See [TAILSCALE.md](TAILSCALE.md) for detailed Tailscale setup.
| Method | How | Trade-offs |
|--------|-----|------------|
| **Tailscale** | `--no-tunnel` | Always-on, encrypted, no splash pages |
| **localtunnel** | Default | Works anywhere, has splash page |
| **LAN** | `--no-tunnel` | Same WiFi only |
## Architecture
See [ARCHITECTURE.md](ARCHITECTURE.md) for the full breakdown.
## License
MIT
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path β even casually (like "the xlsx in my downloads") β and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |