正在自动登录…
chris124567/ cfsolve
cfsolve 是一个 Rust 库和命令行工具,用于解决 Cloudflare Turnstile 小部件和挑战页面,无需无头浏览器。它返回 Turnstile 令牌或 cf_clearance cookie,适用于需要自动化处理 Cloudflare 验证的开发者。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/31 18:21:47 · 查看原文
- 累计 Stars
- 317
- 当前热度
- 1~7 天 · 小火
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/10/31 18:21:47
- 使用方式
提供命令行工具和 Rust 库两种使用方式。命令行通过 challenge 命令解决小部件或挑战页面,库则通过 API 调用。
查看 README 依据
You need the Rust version pinned in `rust-toolchain.toml`, plus CMake, a C/C++ compiler, libclang, and Git (to patch and build BoringSSL). ```sh cargo build --release --bin challenge ``` ## Command line tool ```sh ./target/release/challenge --page 'https://example.com/login' /tmp/solve \ --solve --fingerprint profiles/safari-26-ios.json ``` On success it prints the token (or `cf_clearance=...`) and sends progress to stderr. The directory argument holds all requests and responses for debugging, so it must be empty or not exist yet.
| `--proxy <url>` | Send every request through an `http://`, `https://`, `socks5://`, or `socks5h://` proxy. Put credentials in the URL, as in `socks5h://user:password@host:1080`. | | `-h`, `--help` | Show help. | ## Library Add cfsolve as a path dependency and copy its `[patch]` section, since Cargo only reads patches from the top-level `Cargo.toml`: ```toml [dependencies] cfsolve = { path = "/path/to/cfsolve", default-features = false } tokio = { version = "1", features = ["macros", "rt-multi-thread"] } [patch.crates-io] btls-sys = { path = "/path/to/cfsolve/vendor/btls-sys" }
- 部署要求
需要 Rust 版本(由 rust-toolchain.toml 指定)、CMake、C/C++ 编译器、libclang 和 Git。
查看 README 依据
You need the Rust version pinned in `rust-toolchain.toml`, plus CMake, a C/C++ compiler, libclang, and Git (to patch and build BoringSSL). ```sh cargo build --release --bin challenge ``` ## Command line tool ```sh ./target/release/challenge --page 'https://example.com/login' /tmp/solve \ --solve --fingerprint profiles/safari-26-ios.json ``` On success it prints the token (or `cf_clearance=...`) and sends progress to stderr. The directory argument holds all requests and responses for debugging, so it must be empty or not exist yet.
- 已知限制
目前仅支持 Safari 和 Chrome(ium) 配置文件类型。发送 cf_clearance cookie 时必须使用与配置文件相同的 IP 地址和用户代理,否则 Cloudflare 会拒绝。
查看 README 依据
included: `profiles/safari-26-ios.json` (Safari on iPhone). Each profile references recorded responses to the challenge's browser checks, stored as JSON in a directory. Keep each profile with its directory when you copy. Producing these files requires some manual (or AI) effort though it can be greatly aided by solving challenges in a real web browser with the proxy set to the address of a running `capture-proxy`, which records the decoded payloads sent to Cloudflare. Currently only Safari and Chrome(ium) profile types are supported. ## Building
as the profile, or Cloudflare will reject it. ### Turnstile with a sitekey or your own HTML `PageSource::Navigate` fetches the page. With only a URL and sitekey, use `PageSource::Blank` and specify the widget: ```rust use cfsolve::{PageSource, Turnstile, Widget}; let turnstile = Turnstile { url: "https://example.com/login".parse()?, page: PageSource::Blank, widget: Some(Widget { sitekey: "SITEKEY".into(), action: Some("login".into()), cdata: None, }), }; let token = browser.solve_turnstile(turnstile, &options).await?; ```
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/10/26 10:31:21
- 首次达标收录
- 2026/10/31 18:16:29
- 统计更新时间
- 2026/10/31 18:56:34
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
模型评估
普通加权总分 3.8 / 5
由 Jev 模型根据仓库描述与 README 评估,2026/10/31 18:16:29 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。
仓库信息
- 最近推送
- 2026/10/30 00:40:56
- 许可证标识
- MIT
- Fork 数
- 35
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:小火
首次发现项目