Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
RustTLSX — 🦀 面向 Rust 的隐身 HTTP 客户端。模拟真实浏览器 TLS 指纹,以实现无法被检测的请求。快速、类型安全,专为精准网络通信而构建。 | Kitploit
工具/GitHubGitHub/d0rb/rusttlsx
IDS/IPS规避信息收集Web安全渗透测试隐私保护网络爬虫反机器人指纹欺骗
GitHubd0rb/rusttlsx

RustTLSX

🦀 面向 Rust 的隐身 HTTP 客户端。模拟真实浏览器 TLS 指纹,以实现无法被检测的请求。快速、类型安全,专为精准网络通信而构建。

查看仓库
410个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

RustTLSX 🦀

. 一个面向 Rust 的高级隐身 HTTP 客户端。

专为注重隐私的开发者打造,让你能够完全掌控自己的网络指纹。

看起来像浏览器。行为像浏览器。用 Rust 编写。

Crates.io Documentation License

致谢与基础

基于 bogdanfinn/tls-client 构建 —— 这是业界领先的 TLS 指纹库,受到全球安全专业人士的信赖。我们通过 FFI 绑定使用 bogdanfinn 久经考验的共享库(.dll/.so/.dylib),原因如下:

  • 多年研究:数千小时打磨浏览器 TLS 行为的复现
  • 久经考验:被全球安全公司和隐私工具用于生产环境
  • 持续更新:定期更新以匹配不断演进的浏览器指纹
  • 性能优化:原生 C/Go 实现,速度最大化

RustTLSX 以类型安全、人性化的 API 将这一成熟技术带入 Rust,其速度比 Python 替代方案快 6 倍。

RustTLSX 为何存在

现代 Web 应用会分析你 HTTP 请求的方方面面——不仅是请求头和 Cookie,还包括 TLS 握手的深层加密签名。标准 Rust HTTP 客户端(reqwest、hyper、ureq)会生成容易被检测的模式,从而立即识别出自动化流量。

RustTLSX 通过以下方式解决这一问题:

  • 完美浏览器模仿:来自真实浏览器的正宗 TLS 指纹
  • 请求修改控制:对请求头、Cookie 和时机的细粒度控制
  • 隐私设计:你的流量看起来就像是合法的浏览器会话
  • 性能领先:显著快于任何替代方案
  • 核心能力

    隐私与请求控制

    • 真实浏览器身份:完美复现 Chrome、Firefox、Safari 和 Opera 的 TLS 签名
    • 请求头操控:完全控制请求头、User-Agent 和 Accept 参数
    • Cookie 管理:支持持久化 Cookie 的高级会话处理
    • 时机控制:可配置的请求间隔与连接池
    • 协议选择:支持 HTTP/1.1 和 HTTP/2,并带有与浏览器一致的偏好

    性能优势

    • 比 Python 快 6 倍:原生 Rust 性能,尽可能采用零拷贝操作
    • 内存高效:与标准 HTTP 客户端相比开销极小
    • 并发请求:针对高吞吐场景优化
    • 连接复用:匹配浏览器行为的智能连接池

    高级特性

    • 30+ 浏览器配置文件:大量真实浏览器指纹集合
    • 类型安全:完整的 Rust 编译期保证,配合全面的错误处理
    • 跨平台:支持 Windows、Linux 和 macOS
    • 绕过防护:作为完美模仿的副产品,可绕过检测系统

    快速开始

    前置条件

    从 tls-client releases 下载适用于你平台所需的 TLS 客户端库:

    • Windows:tls-client-windows-64-1.3.3.dll
    • Linux:tls-client-linux-ubuntu-amd64-1.3.3.so
    • macOS:tls-client-darwin-amd64-1.3.3.dylib

    将库文件放在项目根目录、系统库路径(/usr/local/lib/)中,或确保可通过 PATH 访问。

    安装

    将 RustTLSX 添加到你的 Cargo.toml:

    root@kitploit:~
    [dependencies]
    rust-tlsx = "0.1"
    

    基本用法

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    
    fn main() -> anyhow::Result<()> {
        let client = TlsClient::new(BrowserProfile::Firefox120)
            .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0")
            .timeout(30);
        
        let response = client.get("https://example.com")?;
        
        println!("Status: {}", response.status);
        println!("Body: {}", response.body);
        
        Ok(())
    }
    

    可用的浏览器配置文件

    RustTLSX 支持跨主流浏览器的 30 多种浏览器配置文件:

    root@kitploit:~
    // Chrome versions
    BrowserProfile::Chrome103
    BrowserProfile::Chrome107  
    BrowserProfile::Chrome109
    BrowserProfile::Chrome120
    
    // Firefox versions
    BrowserProfile::Firefox102
    BrowserProfile::Firefox105
    BrowserProfile::Firefox108
    BrowserProfile::Firefox120
    
    // Safari versions
    BrowserProfile::Safari15_6_1
    BrowserProfile::Safari16_0
    BrowserProfile::SafariIos16_0
    
    // Opera and others
    BrowserProfile::Opera89
    BrowserProfile::Opera90
    

    高级用法

    自定义请求头与 Cookie

    root@kitploit:~
    let client = TlsClient::new(BrowserProfile::Chrome109)
        .header("Accept", "application/json")
        .header("Accept-Language", "en-US,en;q=0.9")
        .cookie("session", "abc123")
        .cookie("token", "xyz789");
    
    let response = client.get("https://api.example.com")?;
    

    POST 请求

    root@kitploit:~
    let body = r#"{"username": "user", "password": "pass"}"#;
    let response = client.post("https://example.com/login", Some(body.to_string()))?;
    

    请求超时

    root@kitploit:~
    let client = TlsClient::new(BrowserProfile::Firefox120)
        .timeout(60); // seconds
    
    let response = client.get("https://slow-api.example.com")?;
    

    架构与设计理念

    我们为何使用 bogdanfinn 的共享库

    RustTLSX 建立在久经验证的卓越基础之上,而不是重复造轮子。我们通过 FFI 使用 bogdanfinn 编译好的库(.dll/.so/.dylib),原因如下:

    研究投入:Bogdanfinn 投入了数千小时逆向工程浏览器 TLS 行为。重复这项研究需要数年时间,而且很可能得到较差的结果。

    久经考验的可靠性:这些库被全球主要安全公司、隐私工具和研究机构使用。它们已经过所有主要防护系统的测试。

    持续演进:浏览器指纹不断变化。Bogdanfinn 的库会定期更新,以匹配新的浏览器版本和防护系统更新。

    性能优化:原生 C/Go 实现对速度和内存效率进行了深度优化,提供了纯 Rust 实现无法企及的性能。

    技术实现

    运行时动态加载:使用 FFI 按需加载库,消除了静态链接的复杂性,同时保持性能。

    内存管理:Rust 的所有权模型确保了与原生库的安全交互,防止了 C/C++ 实现中常见的内存泄漏和释放后使用(use-after-free)错误。

    错误处理:基于 Result 的全面错误处理在保持类型安全的同时提供详细的诊断信息。

    连接管理:对 TLS 连接进行智能池化与复用,行为模式与浏览器一致。

    所处理的指纹组件

    底层库管理浏览器 TLS 行为的方方面面:

    • 密码套件排序:精确复现浏览器的密码套件偏好
    • TLS 扩展处理:所有 TLS 扩展的正确排序与取值
    • HTTP/2 设置:匹配浏览器行为的帧处理与设置
    • 证书验证:与浏览器一致的证书链验证
    • 会话管理:正确的 TLS 会话恢复与票据处理
    • ALPN 协商:与应用层协议协商(ALPN)匹配浏览器

    示例

    基本 HTTP 请求

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    
    fn main() -> anyhow::Result<()> {
        let client = TlsClient::new(BrowserProfile::Chrome109);
        let response = client.get("https://httpbin.org/get")?;
        
        println!("Status: {}", response.status);
        println!("Body: {}", response.body);
        
        Ok(())
    }
    

    TLS 指纹验证

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    
    fn main() -> anyhow::Result<()> {
        let client = TlsClient::new(BrowserProfile::Firefox120);
        let response = client.get("https://tls.peet.ws/api/all")?;
        
        println!("TLS Fingerprint Analysis:\n{}", response.body);
        
        Ok(())
    }
    

    带认证的请求

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    
    fn main() -> anyhow::Result<()> {
        let client = TlsClient::new(BrowserProfile::Chrome109)
            .header("Authorization", "Bearer YOUR_TOKEN")
            .header("Content-Type", "application/json");
        
        let response = client.get("https://api.example.com/data")?;
        
        match response.status {
            200 => println!("Success: {}", response.body),
            401 => eprintln!("Authentication failed"),
            _ => eprintln!("Request failed with status {}: {}", response.status, response.body),
        }
        
        Ok(())
    }
    

    注重隐私的网页抓取

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    
    fn main() -> anyhow::Result<()> {
        // Create a client that appears as a real Firefox browser
        let client = TlsClient::new(BrowserProfile::Firefox120)
            .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0")
            .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8")
            .header("Accept-Language", "en-US,en;q=0.5")
            .header("Accept-Encoding", "gzip, deflate, br")
            .header("DNT", "1") // Privacy-focused: Do Not Track
            .timeout(30);
        
        // Include session cookies for authenticated requests
        let client = client.cookie("session_id", "your_session_token");
        
        let response = client.get("https://example-site.com/data")?;
        
        match response.status {
            200 => println!("Data retrieved successfully with browser-like privacy"),
            403 => println!("Authentication required - check session cookies"),
            _ => println!("Response: {}", response.status),
        }
        
        Ok(())
    }
    

    高级请求修改

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    use std::collections::HashMap;
    
    fn main() -> anyhow::Result<()> {
        // Simulate a specific browser environment
        let mut headers = HashMap::new();
        headers.insert("User-Agent".to_string(), 
            "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36".to_string());
        headers.insert("Sec-Fetch-Site".to_string(), "same-origin".to_string());
        headers.insert("Sec-Fetch-Mode".to_string(), "navigate".to_string());
        headers.insert("Sec-Fetch-Dest".to_string(), "document".to_string());
        
        let client = TlsClient::new(BrowserProfile::Chrome120)
            .headers(headers)
            .timeout(45);
        
        // Make request that's indistinguishable from real browser
        let response = client.get("https://api.example.com/sensitive-data")?;
        
        println!("Retrieved data with perfect browser mimicry");
        println!("Protocol used: {}", response.used_protocol);
        
        Ok(())
    }
    

    为什么 RustTLSX 胜过所有替代方案

    Rust HTTP 客户端对比

    与所有标准 Rust HTTP 客户端相比,RustTLSX 提供卓越的性能与隐私保护:

    库TLS 指纹性能隐私级别内存占用
    reqwest + rustls可检测的 Rust 签名基准低高
    reqwest + native-tls系统 TLS(可检测)基准低高
    hyper + hyper-tls通用 HTTP/2快低中
    ureq基础 TLS 1.2/1.3慢低低
    rust-tlsx完美的浏览器模仿快 6 倍最高已优化

    技术性能优势

    零拷贝操作:直接向优化的 C/Go 库发起 FFI 调用,消除了困扰纯 Rust 实现的不必要数据拷贝。

    连接池:以与浏览器一致的 keep-alive 行为智能复用 TLS 连接,将握手开销降低高达 80%。

    内存效率:Rust 的所有权模型结合优化的原生库,内存占用比等效的 Python 方案低 40%。

    并发性能:内置异步支持,配合正确的连接多路复用,可随 CPU 核心数线性扩展。

    语言对比

    对比 Python tls-client 绑定:

    • 快 6-10 倍的请求处理
    • 单一二进制部署(无需 Python 运行时)
    • 编译期安全(无运行时类型错误)
    • 更低的资源占用(内存减少 50-70%)

    对比 Go tls-client:

    • 类型安全优势(Rust 的所有权模型)
    • 更好的错误处理(Result 类型对比异常)
    • 内存安全保证(无垃圾回收开销)
    • 生态集成(无缝的 Cargo/crates.io 工作流)

    对比 Node.js 方案:

    • 无 V8 开销(直接原生执行)
    • 可预测的性能(无垃圾回收暂停)
    • 更好的并发模型(结构化并发对比回调)

    安装

    步骤 1:下载 TLS 库

    从 tls-client releases 下载合适的二进制文件:

    • Windows:tls-client-windows-64-1.3.3.dll
    • Linux:tls-client-linux-ubuntu-amd64-1.3.3.so
    • macOS:tls-client-darwin-amd64-1.3.3.dylib

    将库文件放在项目根目录、系统库目录中,或确保可通过 PATH 访问。

    步骤 2:添加依赖

    root@kitploit:~
    [dependencies]
    rust-tlsx = "0.1"
    anyhow = "1.0"
    

    步骤 3:基本实现

    root@kitploit:~
    use rust_tlsx::{TlsClient, BrowserProfile};
    
    fn main() -> anyhow::Result<()> {
        let client = TlsClient::new(BrowserProfile::Firefox120);
        let response = client.get("https://example.com")?;
        println!("Status: {}", response.status);
        Ok(())
    }
    

    API 参考

    TlsClient

    用于以类浏览器 TLS 指纹发起 HTTP 请求的主要客户端接口。

    root@kitploit:~
    impl TlsClient {
        pub fn new(profile: BrowserProfile) -> Self
        pub fn header(self, key: &str, value: &str) -> Self
        pub fn headers(self, headers: HashMap<String, String>) -> Self
        pub fn cookie(self, name: &str, value: &str) -> Self
        pub fn cookies(self, cookies: Vec<CookieInput>) -> Self
        pub fn timeout(self, seconds: i32) -> Self
        pub fn get(&self, url: &str) -> Result<Response>
        pub fn post(&self, url: &str, body: Option<String>) -> Result<Response>
    }
    

    BrowserProfile

    可用浏览器指纹配置文件的枚举:

    root@kitploit:~
    pub enum BrowserProfile {
        // Chrome versions
        Chrome103, Chrome104, Chrome105, Chrome106,
        Chrome107, Chrome108, Chrome109, Chrome120,
        
        // Firefox versions  
        Firefox102, Firefox104, Firefox105, Firefox106,
        Firefox108, Firefox120,
        
        // Safari versions
        Safari15_6_1, Safari16_0,
        SafariIpad15_6, SafariIos15_5, SafariIos15_6, SafariIos16_0,
        
        // Opera versions
        Opera89, Opera90, Opera91,
    }
    

    Response

    客户端方法返回的 HTTP 响应结构:

    root@kitploit:~
    pub struct Response {
        pub status: i32,                              // HTTP status code
        pub used_protocol: String,                    // Protocol used ("h2" or "http/1.1")
        pub body: String,                             // Response body content
        pub headers: HashMap<String, Vec<String>>,    // Response headers
        pub cookies: HashMap<String, String>,         // Set-Cookie values
    }
    

    故障排查

    库加载问题

    错误:Failed to load library: cannot find tls-client-*.dll

    解决方案:

    1. 将库文件放在项目根目录中
    2. 将库位置添加到系统 PATH 中
    3. 复制到系统库目录(Linux/macOS 上为 /usr/local/lib/)
    4. 确认架构正确(64 位与 32 位)

    访问被拒绝(403)响应

    即使拥有真实的 TLS 指纹,可能仍需要其他因素:

    必需的组件:

    • User-Agent:必须与所选浏览器配置文件匹配
    • 会话 Cookie:有效的验证(clearance)或会话令牌
    • 请求头:完整的类浏览器请求头集合
    • 请求时机:避免快速连续请求

    完整示例:

    root@kitploit:~
    let client = TlsClient::new(BrowserProfile::Firefox120)
        .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0")
        .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
        .header("Accept-Language", "en-US,en;q=0.5")
        .header("Accept-Encoding", "gzip, deflate, br")
        .header("Connection", "keep-alive")
        .header("Upgrade-Insecure-Requests", "1");
    

    从源码构建

    root@kitploit:~
    git clone https://github.com/yourusername/rust-tlsx
    cd rust-tlsx
    
    # Download required TLS library
    wget https://github.com/bogdanfinn/tls-client/releases/download/v1.3.3/tls-client-windows-64-1.3.3.dll
    
    # Build the project
    cargo build --release
    
    # Run tests
    cargo test
    cargo run --example simple_request
    

    贡献

    欢迎贡献!请参阅 CONTRIBUTING.md 获取指南。

    可改进的方向:

    • 会话管理与持久化 Cookie
    • 代理支持(HTTP/SOCKS)
    • 自定义 TLS 配置文件创建
    • 更多使用示例
    • Async/await 支持
    • 增强错误处理与诊断

    许可证

    根据以下任一许可证授权:

    • MIT License
    • Apache License, Version 2.0

    底层 TLS 客户端库使用 BSD-4-Clause 许可证。

    相关项目

    • tls-client (Go) —— 原始实现
    • tls-client (Python) —— Python 绑定
    • curl-impersonate —— 基于 cURL 的方案

    支持

    • 问题:GitHub Issues
    • 讨论:GitHub Discussions
    • 文档:docs.rs
    下载工具