mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-09 13:19:37 +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.
27 lines
1.4 KiB
Bash
Executable File
27 lines
1.4 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,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA \
|
|
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"' \
|
|
-H 'sec-ch-ua-mobile: ?0' \
|
|
-H 'sec-ch-ua-platform: "Windows"' \
|
|
-H 'Upgrade-Insecure-Requests: 1' \
|
|
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.47' \
|
|
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
|
|
-H 'Sec-Fetch-Site: none' \
|
|
-H 'Sec-Fetch-Mode: navigate' \
|
|
-H 'Sec-Fetch-User: ?1' \
|
|
-H 'Sec-Fetch-Dest: document' \
|
|
-H 'Accept-Encoding: gzip, deflate, br' \
|
|
-H 'Accept-Language: en-US,en;q=0.9' \
|
|
--http2 --false-start --compressed \
|
|
--tlsv1.2 --alps \
|
|
--cert-compression brotli \
|
|
"$@"
|