Skip to content

curl-impersonatevsexcon

MIT 62 1 3,529
Feb 23 2022 v0.6.1(5 months ago)
1,154 19 26 MIT
Oct 31 2009 2.8 million (month) 0.111.0(30 days 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.

Excon is a Ruby library for making HTTP requests. It is designed to be fast and efficient, and is often used as a building block for other Ruby libraries and frameworks.

One of the main features of Excon is its support for persistent connections, which allows it to reuse the same connection for multiple requests, reducing the overhead of establishing a new connection for each request.

Excon also supports streaming requests and responses, which allows you to read or write data to the server incrementally, without having to load the entire response into memory at once.

Highlights


bypasshttp2tls-fingerprinthttp-fingerprintlow-level

Example Use


curl-impersonate installs itself under `curl_` terminal commands like `curl_chrome116`:
$ 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
require 'excon'

# GET requests
response = Excon.get('https://jsonplaceholder.typicode.com/posts/1')
puts response.body
puts response.status
puts response.headers

# POST requests
response = Excon.post('https://jsonplaceholder.typicode.com/posts',
  :body => { :title => 'foo', :body => 'bar', :userId => 1 }.to_json,
  :headers => { 'Content-Type' => 'application/json' } )
puts response.body

Alternatives / Similar


Was this page helpful?