Skip to content

curl-impersonatevshttp-2

MIT 79 1 5,944
Feb 23 2022 v0.6.1(2024-03-02 18:08:29 ago)
908 6 2 MIT
Sep 25 2013 183.8 thousand (month) 1.1.3(2026-03-05 00:04:35 ago)

Curl-impersonate is a special build of libcurl and cURL HTTP client that impersonates the four major browsers: - Google Chrome - Microsoft Edge - Safari - Firefox Curl-impersonate achieves this by patching TLS and HTTP fingerprints to be identical to that of one of these real browsers.

Unlike other HTTP clients curl-impersonate can bypass TSL and HTTP fingerprinting and detection techniques though it does not implement anything for Javascript fingerprint or bypass.

Pure Ruby, framework and transport agnostic, implementation of HTTP/2 protocol and HPACK header compression with support for:

  • Binary framing parsing and encoding
  • Stream multiplexing and prioritization
  • Connection and stream flow control
  • Header compression and server push
  • Connection and stream management
  • And more... see API docs

Protocol specifications:

  • Hypertext Transfer Protocol Version 2 (RFC 7540)
  • HPACK: Header Compression for HTTP/2 (RFC 7541)

Highlights


bypasshttp2tls-fingerprinthttp-fingerprintlow-level
http2

Example Use


curl-impersonate installs itself under `curl_` terminal commands like `curl_chrome116`: ```shell $ curl_chrome116 https://www.wikipedia.org ``` To use it in HTTP client libraries that use `libcurl` replace curl path with one of these. To use it in python directly see curl-cffi Python package
```ruby require 'http/2' # GET request client = HTTP2::Client.new response = client.get("https://httpbin.org/get") puts response.body # POST reuqest data = { name: "value" } response = client.post("https://www.example.com", data) ```

Alternatives / Similar


Was this page helpful?