Fix Curl's HTTP/2 headers to match Chrome's headers

* Change the default HTTP/2 settings sent by Curl to match the ones that
Chrome sends. They appear in the SETTINGS message in the beginning of
the HTTP/2 handshake, which can be seen only after decrypting the TLS
traffic.
* Change the order of the HTTP/2 pseudo-headers ":authority", ":scheme"
and ":path" in the HEADERS message. Curl sent them in a different order
than Chrome.
This commit is contained in:
lwthiker
2022-02-19 00:49:01 +02:00
parent 647c4f428c
commit 01b4a33c82
5 changed files with 104 additions and 1 deletions
-1
View File
@@ -13,7 +13,6 @@ exec 5<>"$PIPE" 3>"$PIPE" 4<"$PIPE" 5>&-
# https://wiki.mozilla.org/Security/Cipher_Suites
"$dir/curl-impersonate-ch" \
--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 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \