mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-04-27 07:36:47 +00:00

Remove the --false-start flag completely. In the Chrome version it has no affect, and in the Firefox version it may cause connection errors. This flag doesn't seem to affect TLS or HTTP signatures so is safe to remove. The flag seems to cause connection errors with some http/2 servers. The server chooses http/2 based on alpn but curl initiates a http/1.1 connection instead. This is an upstream bug in curl that affects us as well.
23 lines
1.3 KiB
Bash
Executable File
23 lines
1.3 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 the cipherlist array at
|
|
# https://github.com/curl/curl/blob/master/lib/vtls/nss.c
|
|
"$dir/curl-impersonate-ff" \
|
|
--ciphers aes_128_gcm_sha_256,chacha20_poly1305_sha_256,aes_256_gcm_sha_384,ecdhe_ecdsa_aes_128_gcm_sha_256,ecdhe_rsa_aes_128_gcm_sha_256,ecdhe_ecdsa_chacha20_poly1305_sha_256,ecdhe_rsa_chacha20_poly1305_sha_256,ecdhe_ecdsa_aes_256_gcm_sha_384,ecdhe_rsa_aes_256_gcm_sha_384,ecdhe_ecdsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha,ecdhe_rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,rsa_aes_128_gcm_sha_256,rsa_aes_256_gcm_sha_384,rsa_aes_128_sha,rsa_aes_256_sha \
|
|
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0' \
|
|
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
|
|
-H 'Accept-Language: en-US,en;q=0.5' \
|
|
-H 'Accept-Encoding: gzip, deflate, br' \
|
|
-H 'Upgrade-Insecure-Requests: 1' \
|
|
-H 'Sec-Fetch-Dest: document' \
|
|
-H 'Sec-Fetch-Mode: navigate' \
|
|
-H 'Sec-Fetch-Site: none' \
|
|
-H 'Sec-Fetch-User: ?1' \
|
|
-H 'TE: Trailers' \
|
|
--http2 --compressed \
|
|
"$@"
|