Skip to content

Commit

Permalink
Fix impersonate.c
Browse files Browse the repository at this point in the history
  • Loading branch information
perkfly committed Apr 17, 2024
1 parent 594268c commit 36c6ca1
Showing 1 changed file with 52 additions and 5 deletions.
57 changes: 52 additions & 5 deletions chrome/patches/curl-impersonate.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1432,10 +1432,10 @@ index 80e183480..8ee390b7e 100644
* Store nghttp2 version info in this buffer.
diff --git a/lib/impersonate.c b/lib/impersonate.c
new file mode 100644
index 000000000..fcf667ab0
index 000000000..ef2023033
--- /dev/null
+++ b/lib/impersonate.c
@@ -0,0 +1,923 @@
@@ -0,0 +1,970 @@
+#include "curl_setup.h"
+
+#include <curl/curl.h>
Expand Down Expand Up @@ -1846,6 +1846,52 @@ index 000000000..fcf667ab0
+ .tls_grease = true
+ },
+ {
+ .target = "chrome123",
+ .httpversion = CURL_HTTP_VERSION_2_0,
+ .ssl_version = CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_DEFAULT,
+ .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",
+ .npn = false,
+ .alpn = true,
+ .alps = true,
+ .tls_permute_extensions = true,
+ .tls_session_ticket = true,
+ .cert_compression = "brotli",
+ .http_headers = {
+ "sec-ch-ua: \"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
+ "sec-ch-ua-mobile: ?0",
+ "sec-ch-ua-platform: \"macOS\"",
+ "Upgrade-Insecure-Requests: 1",
+ "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
+ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Sec-Fetch-Site: none",
+ "Sec-Fetch-Mode: navigate",
+ "Sec-Fetch-User: ?1",
+ "Sec-Fetch-Dest: document",
+ "Accept-Encoding: gzip, deflate, br, zstd",
+ "Accept-Language: en-US,en;q=0.9"
+ },
+ .http2_settings = "1:65536;2:0;4:6291456;6:262144",
+ .http2_window_update = 15663105,
+ .ech = "GREASE",
+ .tls_extension_order = NULL,
+ .tls_grease = true
+ },
+ {
+ .target = "chrome124",
+ .httpversion = CURL_HTTP_VERSION_2_0,
+ .ssl_version = CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_DEFAULT,
Expand Down Expand Up @@ -1873,18 +1919,19 @@ index 000000000..fcf667ab0
+ .tls_session_ticket = true,
+ .cert_compression = "brotli",
+ .http_headers = {
+ "sec-ch-ua: \"Not_A Brand\";v=\"8\", \"Chromium\";v=\"124\", \"Google Chrome\";v=\"120\"",
+ "sec-ch-ua: \"Chromium\";v=\"124\", \"Google Chrome\";v=\"124\", \"Not-A.Brand\";v=\"99\"",
+ "sec-ch-ua-mobile: ?0",
+ "sec-ch-ua-platform: \"macOS\"",
+ "Upgrade-Insecure-Requests: 1",
+ "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
+ "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
+ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Sec-Fetch-Site: none",
+ "Sec-Fetch-Mode: navigate",
+ "Sec-Fetch-User: ?1",
+ "Sec-Fetch-Dest: document",
+ "Accept-Encoding: gzip, deflate, br, zstd",
+ "Accept-Language: en-US,en;q=0.9"
+ "Accept-Language: en-US,en;q=0.9",
+ "Priority: u=0, i"
+ },
+ .http2_settings = "1:65536;2:0;4:6291456;6:262144",
+ .http2_window_update = 15663105,
Expand Down

0 comments on commit 36c6ca1

Please sign in to comment.