Commit Graph

5 Commits

Author SHA1 Message Date
lwthiker
bafc1416e3 Add full support for TLS certificate compression
This commit adds:
* Support for configuring the TLS certificate compression algorithms the
client is willing to receive via the CURLOPT_SSL_CERT_COMPRESSION option or
the '--cert-compression' command line flag.
* Support for decompressing zlib-compressed certificates in addition to
brotli.

Previously brotli decompression only was available and it was hardcoded
into the binary.
2022-03-02 15:23:24 +02:00
lwthiker
87ed6a2792 Make some of the TLS options configurable
This commit makes some of the TLS options that are used for
impersonation configurable via libcurl options and command line flags to
curl-impersonate. The goal is to give more flexibility in configuring
the TLS extensions instead of hardcoding everything into the binary.
This will enable using the same binary for impersonating different
browsers (e.g. Safari).

The following options are now present:
* CURLOPT_SSL_EC_CURVES and the '--curves' flag are now usable. These
were present in the upstream curl but only for OpenSSL builds. This
commit also enables them for BoringSSL. They configure TLS extension
'supported_groups' (no. 10).
* CURLOPT_SSL_ENABLE_NPN and the '--no-npn' flags are usable. These were
present in the upstream curl but were disabled in a previous commit by
commenting out the relevant code (as Chrome disables NPN). They now work
and the wrapper scripts use the '--no-npn' flag.
* CURLOPT_SSL_ENABLE_ALPS and the '--alps' flag were added. These
control the ALPS TLS extension that Chrome uses.
* CURLOPT_SSL_SIG_HASH_ALGS and the '--signature-hashes' option were
added. These control the clien't list of supported signature & hash
algorithms, i.e. TLS extension 'signature_algorithms' (no. 13).
2022-03-02 10:28:35 +02:00
lwthiker
bd721758c7 Fix binary names 2022-02-19 15:34:19 +02:00
lwthiker
1b41b6de84 Add --compressed flag by default
Similar to https://github.com/lwthiker/curl-impersonate/pull/5
2022-02-19 14:55:50 +02:00
lwthiker
367f91922d Move Chrome related files to their own directory
Building curl-impersonate with Chrome impersonation requires a different
compilation and a different set of patches which may conflict with the
Firefox impersonation. Therefore we will treat them a separate builds.
All chrome related files were moved to the chrome/ directory.
2022-02-19 11:05:20 +02:00