undetected-httpx 是一个基于 ProjectDiscovery 的 httpx 构建的 HTTP 探测工具包,其浏览器 TLS 和 HTTP/2 指纹由 HTTPCloak 提供支持。
2.0 版本用 httpx v1.12.0 的 Go 分支取代了 Python 封装。你依然可以使用上游的探测功能、命令行标志和输出格式,同时由 HTTPCloak v1.7.3 处理主要的 HTTP 传输。默认浏览器配置文件为 chrome-latest。
使用 Go 1.26.0+ 安装:
go install github.com/Michele0303/undetected-httpx/v2/cmd/undetected-httpx@latest
使用 @v2.0.0 代替 @latest 以固定版本。将你的 Go 二进制目录添加到 PATH:$GOBIN,或在 GOBIN 未设置时使用 $(go env GOPATH)/bin。
预编译的 Linux 和 macOS 二进制文件可在 releases 中获取。
git clone --branch v2.0.0 https://github.com/Michele0303/undetected-httpx.git
cd undetected-httpx
make build
./bin/undetected-httpx -h
运行 make install 将命令安装到你的 Go 二进制目录。
之前的 Python 包仍保留在 legacy/python 中;升级时请参阅迁移指南。
在相同的五个选定 URL 上,使用相同的 User-Agent,httpx 返回 403 Forbidden,而 undetected-httpx 返回 200 OK。
undetected-httpx 2.0
|
httpx v1.12.0(原版)
|
真实工具执行,于 2026 年 10 月 16 日使用 VHS 录制。结果因网站而异;200 响应仍可能包含挑战页面。
| 功能 | undetected-httpx 2.0 | httpx v1.12.0 |
|---|---|---|
| 网络栈 | HTTPCloak | Go net/http |
| 默认 TLS 指纹 | 浏览器配置文件(chrome-latest) | 上游默认值 |
| 选定演示结果 | ✅ 5 × HTTP 200 | 5 × HTTP 403 |
| 探测与输出 | httpx 探测、文本和 JSONL | httpx 探测、文本和 JSONL |
--browser 或 -impersonate 选择配置文件。--native-http 以支持自定义解析器、IP/网络控制、TLS 证书探测和原始请求。浏览器模拟并不保证访问权限,也无法解决 JavaScript 挑战。此适配器支持 HTTP/1.1 和 HTTP/2;支持的选项请参阅兼容性表。
# 探测目标并显示状态码和标题。
undetected-httpx -l targets.txt -sc -title
# 选择浏览器配置文件并写入 JSONL。
undetected-httpx -u https://example.com --browser chrome-latest -json
# 使用原生传输进行 TLS 和 IP 探测。
undetected-httpx -u https://example.com --native-http -tls-grab -ip
运行 make test 进行本地回归测试。上游与许可证