How iruko233/turnstile-slip works
Purpose and Entry Point
Turnstile-Slip is a local Node.js HTTP service that automates Cloudflare Turnstile completion and returns a target page’s cf_clearance cookie. The executable service and likely all orchestration logic are in captchaSolver.js; runtime dependencies and scripts are defined in package.json.
Public API Boundary
The service listens locally on port 3000 and exposes GET /api. Requests supply a required target URL plus optional fast, proxy, and ua query parameters. The HTTP layer is implemented in captchaSolver.js; callers receive page title, effective User-Agent, and clearance cookie rather than direct browser control.
Browser-Automation Pipeline
For each API request, the solver creates/configures an automated browser environment, navigates to the target, and waits for Turnstile verification to establish cf_clearance. This central lifecycle—from browser launch through result collection and teardown—belongs to captchaSolver.js.
Environment Fingerprint Configuration
Optional ua input drives browser identity alignment: OS/platform and Chrome major version are inferred from the supplied User-Agent. Optional HTTP/SOCKS5 proxy routes browser traffic; proxy geolocation is used to synchronize browser locale and timezone. These anti-fingerprinting controls are part of the request-to-browser configuration boundary in captchaSolver.js.
Completion Detection and Response Modes
Normal mode waits for the standard automation flow to finish. Fast mode periodically reads browser cookie state and returns immediately when cf_clearance appears, reducing API latency. Cookie polling, result extraction, and response serialization are handled by captchaSolver.js.
Runtime and External Dependencies
The system runs on Node.js and requires packages installed via npm (package.json, package-lock.json). It interacts with arbitrary target sites protected by Cloudflare Turnstile, optional upstream proxy servers, and a GeoIP data/service dependency implied by proxy-location resolution. Demo images are stored under assets/.
Main entry points: captchaSolver.js Browser lifecycle · package.json npm dependencies · package-lock.json Dependency lockfile
Components 14
Local solver service
- GET /api · Accepts target URL plus fast, proxy, and ua options.
captchaSolver.js - Request configuration · Builds browser settings from URL, User-Agent, and proxy inputs.
captchaSolver.js - Fingerprint alignment · Infers platform and Chrome version; aligns locale and timezone.
captchaSolver.js - Browser lifecycle · Launches, navigates, collects results, and tears down the browser.
captchaSolver.js - Turnstile completion · Waits for the target page to establish clearance.
captchaSolver.js - Fast cookie polling · Periodically checks cookies and exits when cf_clearance appears.
captchaSolver.js - Result response · Returns title, effective User-Agent, and cf_clearance.
captchaSolver.js - Node.js runtime
- npm dependencies · Defines installed runtime packages and scripts.
package.json - Dependency lockfile
package-lock.json
External systems
- Target site · Arbitrary target page protected by Turnstile.
- Upstream proxy
- Proxy GeoIP · Supplies proxy location for locale and timezone synchronization.
Other components
- API caller
Connections 17
- API caller → GET /api: GET request
- GET /api → Request configuration: validates options
- Request configuration → Fingerprint alignment: ua and proxy settings
- Request configuration → Browser lifecycle: launch configuration
- Fingerprint alignment → Browser lifecycle: identity settings
- Browser lifecycle → Target site: navigates to target
- Browser lifecycle → Upstream proxy: routes traffic when supplied
- Upstream proxy → Proxy GeoIP: location lookup
- Proxy GeoIP → Fingerprint alignment: locale and timezone
- Browser lifecycle → Turnstile completion: normal mode
- Browser lifecycle → Fast cookie polling: fast mode
- Turnstile completion → Result response: clearance established
- Fast cookie polling → Result response: cf_clearance found
- Result response → API caller: title, UA, cookie
- Node.js runtime → GET /api: runs service
- npm dependencies → Node.js runtime: installs runtime packages
- Dependency lockfile → npm dependencies: pins dependency resolution