Commit Graph

48 Commits

Author SHA1 Message Date
lwthiker
e5670826ba Add impersonation support for Safari 15.5 2022-07-05 08:22:07 +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
lwthiker
d4e4fbf99d Update README.md 2022-02-26 13:10:15 +02:00
lwthiker
8714c4631c Update README.md about libcurl-impersonate 2022-02-26 12:48:17 +02:00
lwthiker
1f740c5d51 Add link to AUR packages in README.md 2022-02-23 23:00:21 +02:00
lwthiker
6e672bc719 Add automated tests to verify curl's TLS signature
Add automated testing infrastructure with tests verifying that
`curl-impersonate` has the same TLS signature as that of the
impersonated browser.

Each wrapper script (e.g. curl_chrome98) is launched to wikipedia.org
while a packet capture is running in the background. The Client Hello
is extracted from the capture, parsed and then compared to the known
browser signature.

The known signatures are stored in a YAML database.
2022-02-22 18:10:18 +02:00
lwthiker
cbeb9fb9c6 Update README.md with new blog post link
Add link to the new blog post about impersonating Chrome.
2022-02-20 15:08:37 +02:00
lwthiker
248e737d62 Update README.md 2022-02-19 15:52:07 +02:00
lwthiker
7d41696c84 Update README.md 2022-02-19 15:27:32 +02:00
lwthiker
72cb415d59 Update README.md 2022-02-19 09:31:48 +02:00
lwthiker
b00ad551b6 Add support for impersonating Firefox ESR 91
As suggested on the Hacker News thread
(https://news.ycombinator.com/item?id=30378562), add support for Firefox
Extended Support Release.

The required changes were adding one more cipher to the
ciphers list and changing the user agent. Apart from that the TLS
fingerprint is identical to Firefox 95 which was already supported.
2022-02-18 07:59:53 +02:00
lwthiker
4fe2fd36af Update README.md 2022-02-17 22:44:24 +02:00
lwthiker
b9350c1510 Add link to the blog post in README.md 2022-02-17 22:23:39 +02:00
lwthiker
8862988c95 Update README.md 2022-02-17 21:39:51 +02:00
lwthiker
a1b45a2eba Update README.md 2022-02-17 21:34:46 +02:00
lwthiker
9457aa17cf Update README.md 2022-02-17 18:57:09 +02:00
lwthiker
0cb95660e6 Update README.md 2022-02-17 18:44:34 +02:00
lwthiker
3439319c42 Update README.md 2022-02-17 18:37:15 +02:00
lwthiker
4b2f502491 Initial commit 2022-02-17 18:23:38 +02:00