Commit Graph

67 Commits

Author SHA1 Message Date
lwthiker
e987cd6646 Update version and README 2023-02-26 10:23:39 +02:00
lwthiker
9d05a81030 Impersonate Chrome 110 (#148)
Add support for impersonating Chrome 110. Chrome 110 comes with TLS
extension permutation enabled by default. We mimic this behavior in libcurl with
the new CURLOPT_SSL_PERMUTE_EXTENSIONS option, which enables the
corresponding flag in BoringSSL.

---------

Co-authored-by: Johann Saunier <saunier.johann@gmail.com>
2023-02-25 11:29:14 +02:00
lwthiker
54693023a3 Impersonate Firefox 109
Firefox impersonation was not updated in a long while. Add impersonation
for Firefox 109. The TLS signature is identical to previous versions,
with the usual changes to the HTTP headers.

Update NSS to the latest version as well, even though it is not
strictly necessary for the impersonation.
2023-01-28 18:37:40 +02:00
lwthiker
74c44c890f Add missing wrapper script and fix README 2022-11-13 08:16:45 +02:00
lwthiker
1ab42e1111 Add support for impersonating Chrome 107
Chrome 107 was recently released. The only difference in signature from
previous Chrome versions is that an HTTP2_NO_SERVER_PUSH setting is sent
in the HTTP2 SETTINGS frame.
2022-11-12 21:49:35 +02:00
lwthiker
27efac6b95 Create docs/ folder with initial content
Add more documentation on the following topics:
* Running `curl-impersonate` from the command line, including changing
the HTTP headers when needed.
* Using `libcurl-impersonate` in JS and PHP scripts.
2022-09-10 19:07:14 +03:00
lwthiker
aa45fecf45 Add impersonation support for Chrome 104 2022-08-11 10:31:32 +03:00
lwthiker
6f45c8341c Update README.md with additional dependencies 2022-08-03 10:17:21 +03:00
lwthiker
45b2248641 Merge branch 'main' into docs-deps-notes 2022-08-03 10:02:03 +03:00
lwthiker
52d74d29ea Merge pull request #94 from lwthiker/control_headers_from_env_var
Allow disabling built-in HTTP headers
2022-07-30 11:19:47 +03:00
lwthiker
bbaec0fad0 Update version to 0.5.2 2022-07-30 10:11:06 +03:00
lwthiker
5eac598d4d Allow disabling built-in HTTP headers
Let the user disable the built-in list of HTTP headers when using
libcurl-impersonate, either directly or when replacing it at runtime
with LD_PRELOAD. This is intended to give the user more precise control
over the content and order of the HTTP headers.

To support this, the curl_easy_impersonate() now has an added argument
that can be set to 0, in which case the built-in list of HTTP headers
used by libcurl-impersonate will not be automatically sent. Instead,
the user is expected to supply all the headers by themselves using the
standard CURLOPT_HTTPHEADER libcurl option.

When using LD_PRELOAD to inject libcurl-impersonate, one can disable
the built-in headers by setting the CURL_IMPERSONATE_HEADERS
environment variable to "no".
2022-07-29 18:19:36 +03:00
Dawid Wróbel
14796a1005 Docs: add notes on dependencies, fix links 2022-07-29 01:02:48 +02:00
Matheus Fillipe
9788522e4d Add pre compiled packages to AUR (#86)
Add -bin AUR packages for the pre compiled releases:

https://aur.archlinux.org/packages/curl-impersonate-bin
https://aur.archlinux.org/packages/libcurl-impersonate-bin
2022-07-16 09:08:11 +03:00
lwthiker
6903c01688 Update README.md 2022-07-15 11:02:22 +03:00
lwthiker
6572db81db Update README.md 2022-07-14 10:39:36 +03:00
lwthiker
1253375893 Update README.md 2022-07-14 10:39:08 +03:00
lwthiker
cc1a1c097c Merge pull request #84 from lwthiker/safari_15_5
Add impersonation support for Safari 15.5
2022-07-05 09:05:46 +03:00
lwthiker
e5670826ba Add impersonation support for Safari 15.5 2022-07-05 08:22:07 +03:00
lwthiker
f60fa9ae5a Add sponsors section to README.md 2022-07-04 20:31:25 +03:00
lwthiker
440fdd2606 Add impersonation support for Firefox 102 2022-07-03 12:09:55 +03:00
lwthiker
4e0ca423af Update README.md with up-to-date information 2022-06-23 13:22:46 +03:00
lwthiker
1702f0f804 Store the supported browsers list as a JSON file
For easier programmatic access from scripts, etc., store the list of
supported browsers in a browsers.json file. For each browser we store
its details (name, version), which curl-impersonate binary is needed
(chrome vs. firefox) and the name of the wrapper script.
2022-06-23 13:16:15 +03:00
lwthiker
fd7bd09bda Update README.md with latest Docker tags 2022-06-03 21:33:08 +03:00
lwthiker
ec2067cb47 Update README.md 2022-06-03 20:38:42 +03:00
lwthiker
33b63f49e5 Update README.md 2022-05-20 18:10:29 +03:00
lwthiker
82bca6dab7 Handle curl_easy_reset() calls when impersonating (#44)
curl_easy_reset() may be used by an application to reset the options on
a curl handle. If an app has the CURL_IMPERSONATE env var defined, then
the impersonation options are automatically set in curl_easy_init() but
will be cleared in a call to curl_easy_reset(). The desired behavior is
for the impersonation options to be retained (as they are "transparent"
to the user), which this commit takes care of.

Note that this only has an effect when libcurl-impersonate is loaded and
the CURL_IMPERSONATE env var is set. Otherwise the regular behavior of
resetting all the handle options is retained.

Test that the unique TLS signature of curl-impersonate is preserved
after a call to curl_easy_reset() when libcurl-impersonate is loaded.
For this purpose change the 'minicurl' testing util to support multiple
URLs and launch it with 2 different URLs when testing the TLS signature.
2022-05-18 11:43:46 +03:00
lwthiker
14de5bb0db Add impersonation support for Chrome 100 and 101
.. and for Edge 101 as well. The TLS fingerprint is identical to
previous versions. The HTTP headers have the usual differences in the
user agents. One important change though is in the way the HTTP2
SETTINGS frame is formed. Up until Chrome 98, there was an additional
randomly-generated setting in the frame. This seems to have been removed
since. Therefore it was removed from curl-impersonate as well, and
support for Chrome/Edge 98 was deprecated, since supporting both
signatures requires a lot of work.
2022-05-17 20:53:39 +03:00
lwthiker
2a03f51297 Fix incorrect link name in README.md 2022-05-15 20:54:03 +03:00
lwthiker
92a5b8c7ab Add support for impersonating Firefox 100
Add support for impersonating Firefox 100. The TLS signature is identical to
previous versions of Firefox.

In addition, upgrade NSS (Firefox's TLS library) to version 3.77 used by
Firefox 100. This is not strictly necessary as the previous version used
works just fine, but it's better keep up with the newest version.
2022-05-15 20:50:45 +03:00
lwthiker
e042960659 Update README.md about pre-compiled binaries 2022-05-14 18:49:46 +03:00
lwthiker
0b45494394 Update README.md for version 0.4.0 2022-04-30 15:15:50 +03:00
lwthiker
e3a552f90c Update README.md and INSTALL.md for macOS 2022-04-30 13:58:11 +03:00
lwthiker
22c6e96089 Update README.md
Try to fix GitHub Actions badges showing "no status"
2022-04-17 11:32:28 +03:00
lwthiker
f1324f7718 Add Badge for the native-build GitHub Action 2022-04-12 16:55:00 +03:00
lwthiker
facd6e5551 Use configurable binaries directory in the tests
Locate curl-impersonate and libcurl-impersonate in a directory which is
configurable from the command line instead of looking for them in the
current directory. '--install-dir' is passed to pytest, where a 'bin'
and 'lib' directories are expected with (lib)curl-impersonate.

Rename the Actions file for the Docker build to allow the creation of
addition Action for native builds.
2022-04-12 16:50:24 +03:00
lwthiker
493576a15e Add INSTALL.md
Add INSTALL.md with explanation about using the new Makefile-based build
system and the Docker-based build system, and remove the same section
from README.md.
2022-04-12 12:29:47 +03:00
lwthiker
22508c6863 Use different binary names for Firefox and Chrome
Rename the binary files of curl-impersonate so that the Firefox and
Chrome versions can co-exist on the same system. The Firefox version is
now named 'curl-impersonate-ff' and 'libcurl-impersonate-ff' and the
Chrome version is named 'curl-impersonate-chrome' and
'libcurl-impersonate-chrome'. The wrapper scripts look for these names
as well. Symbolic names with the old names are still created inside the
Docker images to keep compatibility as much as possible.
2022-04-08 19:10:35 +03:00
lwthiker
584ff54653 Add signature for Chrome 99 on Android phone
Add support for impersonating Chrome 99 on Android 12 (Pixel 6 was
chosen as an arbitrary Android phone to impersonate). The TLS signature
for Chrome on Android is identical to Chrome on Windows. The difference
is in a few HTTP headers ('sec-ch-ua-mobile', 'sec-ch-ua-platform' and
'user-agent').
2022-03-24 21:01:47 +02:00
lwthiker
768e37d194 Impersonate Firefox 98
Add support for impersonating Firefox 98 released a few days ago. It has
the same TLS signature as Firefox 95 so the adaptation includes changing
the user-agent only. Upgrade the NSS version used to 3.75, even though
it's not strictly necessary.
2022-03-12 10:44:24 +02:00
lwthiker
aba67a4cbe Fix typo and link in README.md 2022-03-10 13:38:37 +02:00
lwthiker
2cf96e9337 Update README.md with Alpine-based Docker images 2022-03-10 13:34:56 +02:00
lwthiker
7df69b5107 Compile libbrotli statically into curl-impersonate
Compile libbrotli statically into curl-impersonate/libcurl-impersonate
for convenience of usage outside the container.
2022-03-08 15:45:30 +02:00
lwthiker
253285a84f Update README.md
* Add a full list of supported browsers.
* Split "Usage" to "Basic usage" and "Advanced usage"
2022-03-05 14:16:11 +02:00
lwthiker
d577ee92f1 Add GitHub actions badge to README.md 2022-03-05 11:11:40 +02:00
lwthiker
e897975660 Update README.md 2022-03-03 15:16:27 +02:00
lwthiker
a7cbfd9fed Add libcurl impersonation support in Firefox build
48415a4b00 added impersonation
capabilities to libcurl in the Chrome build. This adds the same
capabilities to the Firefox build as well.

curl-impersonate.patch generated from
b30b245b72
2022-02-28 10:18:04 +02:00
lwthiker
00dc027185 Update README.md 2022-02-27 23:56:35 +02:00
lwthiker
839e4e6ea7 Merge branch 'main' into libcurl-impersonate 2022-02-27 23:38:49 +02:00
lwthiker
f0b2061a68 Impersonate Edge
Microsoft Edge is, since 2019, based on Chromium. It has a completely
identical TLS signature to Chrome's. The only difference is in the HTTP
headers. Adding support for impersonating Edge was therefore extremely
simple.
2022-02-26 22:50:11 +02:00