Skip to content

curl-impersonate: A special build of curl that can impersonate Chrome & Firefox

Merge branch 'main' into docs-deps-notes

lwthiker45b2248641a1
diff --cc INSTALL.md
index c69b588,adee341..285fcea
--- a/INSTALL.md
+++ b/INSTALL.md
@@@ -164,10 -160,10 +164,10 @@@ The Docker build is a bit more reproduc
```
docker build -t curl-impersonate-chrome chrome/
```
- The resulting image contains a `/build/out` directory with the following:
+ The resulting binaries and libraries are in the `/usr/local` directory, which contains:
* `curl-impersonate-chrome`, `curl-impersonate` - The curl binary that can impersonate Chrome/Edge/Safari. It is compiled statically against libcurl, BoringSSL, and libnghttp2 so that it won't conflict with any existing libraries on your system. You can use it from the container or copy it out. Tested to work on Ubuntu 20.04.
- * `curl_chrome98`, `curl_chrome99`, `...` - Wrapper scripts that launch `curl-impersonate` with all the needed flags.
+ * `curl_chrome99`, `curl_chrome100`, `...` - Wrapper scripts that launch `curl-impersonate` with all the needed flags.
-* `libcurl-impersonate-chrome.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](#libcurl-impersonate) below for more details.
+* `libcurl-impersonate-chrome.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](README.md#libcurl-impersonate) for more details.
You can use them inside the docker, copy them out using `docker cp` or use them in a multi-stage docker build.
@@@ -176,10 -172,10 +176,10 @@@ Build with
```
docker build -t curl-impersonate-ff firefox/
```
- The resulting image contains a `/build/out` directory with the following:
+ The resulting binaries and libraries are in the `/usr/local` directory, which contains:
* `curl-impersonate-ff`, `curl-impersonate` - The curl binary that can impersonate Firefox. It is compiled statically against libcurl, nss, and libnghttp2 so that it won't conflict with any existing libraries on your system. You can use it from the container or copy it out. Tested to work on Ubuntu 20.04.
* `curl_ff91esr`, `curl_ff95`, `...` - Wrapper scripts that launch `curl-impersonate` with all the needed flags.
-* `libcurl-impersonate-ff.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](#libcurl-impersonate) below for more details.
+* `libcurl-impersonate-ff.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](README.md#libcurl-impersonate) for more details.
If you use it outside the container, install the following dependency:
* `sudo apt install libnss3`. Even though nss is statically compiled into `curl-impersonate`, it is still necessary to install libnss3 because curl dynamically loads `libnssckbi.so`, a file containing Mozilla's list of trusted root certificates. Alternatively, use `curl -k` to disable certificate verification.
diff --cc README.md
index a1df322,c1ec2ad..5442084
--- a/README.md
+++ b/README.md
@@@ -125,13 -128,13 +130,18 @@@ The `CURL_IMPERSONATE` env var has two
This means that all the options needed for impersonation will be automatically set for any curl handle.
- Note that the above will NOT WORK for `curl` itself because the curl tool overrides the TLS settings. Use the wrapper scripts instead.
+ If you need precise control over the HTTP headers, set `CURL_IMPERSONATE_HEADERS=no` to disable the built-in list of HTTP headers, then set them yourself with `curl_easy_setopt()`. For example:
+ ```bash
+ LD_PRELOAD=/path/to/libcurl-impersonate.so CURL_IMPERSONATE=chrome101 CURL_IMPERSONATE_HEADERS=no my_app
+ ```
+
+ Note that the `LD_PRELOAD` method will NOT WORK for `curl` itself because the curl tool overrides the TLS settings. Use the wrapper scripts instead.
+### Notes on dependencies
+
+If you intend to copy the self-compiled artifacts to another system, or use the [Pre-compiled binaries](#pre-compiled-binaries) provided by the project, make sure that all the additional dependencies are met on the target system as well.
+In particular, see the [note about the Firefox version](INSTALL.md#a-note-about-the-firefox-version).
+
## Contents
This repository contains two main folders: