mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-11 03:09:25 +00:00

* Upgrade baseline curl to 8.1.1 New curl version includes bugfixes, new options but mainly websocket support which was long requested in curl impersonate. Upstream curl reworked a lot of their http2 code which necessitated a lot of changes on our side as well. * Fix build on mac due to bad header priorities On macos, clang gives priority to /usr/local/include over locations specified with -isystem for some unknown reason. In turn this causes clang to use the system's openssl, which conflicts with curl-impersonate's boringssl headers. To prevent that, disable curl's automatic conversion of -I flags to -isystem. * Upgrade zlib version * Upgrade GitHub Mac runner to macos-12 * Upgrade nghttp2 version to 1.56.0 curl-8.1.1 uses an nghttp2 function that only exists in newer versions of nghttp2.
21 lines
1.9 KiB
Bash
Executable File
21 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Find the directory of this script
|
|
dir=${0%/*}
|
|
|
|
# The list of ciphers can be obtained by looking at the Client Hello message in
|
|
# Wireshark, then converting it using this reference
|
|
# https://wiki.mozilla.org/Security/Cipher_Suites
|
|
"$dir/curl-impersonate-chrome" \
|
|
--ciphers TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_128_GCM_SHA256:TLS_RSA_WITH_AES_256_CBC_SHA256:TLS_RSA_WITH_AES_128_CBC_SHA256:TLS_RSA_WITH_AES_256_CBC_SHA:TLS_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:TLS_RSA_WITH_3DES_EDE_CBC_SHA \
|
|
--curves X25519:P-256:P-384:P-521 \
|
|
--signature-hashes ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,ecdsa_sha1,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1 \
|
|
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15' \
|
|
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
|
|
-H 'Accept-Language: en-us' \
|
|
-H 'Accept-Encoding: gzip, deflate, br' \
|
|
--http2 --false-start --compressed \
|
|
--tlsv1.0 --no-tls-session-ticket \
|
|
--http2-pseudo-headers-order 'mspa' \
|
|
"$@"
|