You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# You may need to update the linker's cache to find libcurl-impersonate
41
-
sudo ldconfig
42
-
# Optionally remove all the build files
43
-
cd ../ && rm -Rf build
44
-
```
45
-
46
-
This will install curl-impersonate, libcurl-impersonate and the wrapper scripts to `/usr/local`. To change the installation path, pass `--prefix=/path/to/install/` to the `configure` script.
47
-
48
-
After installation you can run the wrapper scripts, e.g.:
49
-
50
-
```sh
51
-
curl_chrome119 https://www.example.com
52
-
```
53
-
54
-
or run directly with you own flags:
55
-
56
-
```sh
57
-
curl-impersonate https://www.example.com
58
-
```
59
-
60
-
### Red Hat based (CentOS/Fedora/Amazon Linux)
61
-
62
-
Install dependencies:
63
-
64
-
```sh
65
-
yum groupinstall "Development Tools"
66
-
yum groupinstall "C Development Tools and Libraries"# Fedora only
67
-
yum install cmake3 python3 python3-pip
68
-
# Install Ninja. This may depend on your system.
69
-
yum install ninja-build
70
-
# OR
71
-
pip3 install ninja
72
-
yum install zstd libzstd-devel
73
-
```
74
-
75
-
For the Chrome version, install Go.
76
-
You may need to follow the [Go installation instructions](https://go.dev/doc/install) if it's not packaged for your system:
77
-
78
-
```sh
79
-
yum install golang
80
-
```
81
-
82
-
Then follow the 'Ubuntu' instructions for the actual build.
83
-
84
-
### macOS
85
-
86
-
Install dependencies for building all the components:
87
-
88
-
```sh
89
-
brew install pkg-config make cmake ninja autoconf automake libtool
`--with-zlib/zstd` is the location of a compiled zlib/zstd library for the target architecture.
143
-
`--with-ca-path` and `--with-ca-bundle` will be passed to curl's configure script as is.
144
-
145
-
## Docker build
146
-
147
-
The Docker build is a bit more reproducible and serves as the reference implementation. It creates a Debian-based Docker image with the binaries.
148
-
149
-
[`chrome/Dockerfile`](chrome/Dockerfile) is a debian-based Dockerfile that will build curl with all the necessary modifications and patches. Build it like the following:
150
-
151
-
```sh
152
-
docker build -t curl-impersonate chrome/
153
-
```
154
-
155
-
The resulting binaries and libraries are in the `/usr/local` directory, which contains:
156
-
157
-
*`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.
158
-
*`curl_chrome99`, `curl_chrome100`, `...` - Wrapper scripts that launch `curl-impersonate` with all the needed flags.
159
-
*`libcurl-impersonate.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](README.md#libcurl-impersonate) for more details.
160
-
161
-
You can use them inside the docker, copy them out using `docker cp` or use them in a multi-stage docker build.
0 commit comments