mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-09 13:19:37 +00:00
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).
This commit is contained in:
@@ -20,5 +20,6 @@ dir=`echo "$0" | sed 's%/[^/]*$%%'`
|
||||
-H 'Sec-Fetch-Dest: document' \
|
||||
-H 'Accept-Encoding: gzip, deflate, br' \
|
||||
-H 'Accept-Language: en-US,en;q=0.9' \
|
||||
--http2 --false-start --tlsv1.2 --compressed \
|
||||
--http2 --false-start --compressed \
|
||||
--tlsv1.2 --no-npn --alps \
|
||||
$@
|
||||
|
Reference in New Issue
Block a user