Add Edge 98 signature to libcurl-impersonate

This commit is contained in:
lwthiker
2022-02-27 23:48:17 +02:00
parent 839e4e6ea7
commit 4e2e782e5f
2 changed files with 48 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ index 2dbfb26b5..e0bf86169 100644
* NAME curl_easy_getinfo()
*
diff --git a/lib/easy.c b/lib/easy.c
index 20293a710..df3e66bc0 100644
index 20293a710..ec16aee23 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -80,6 +80,7 @@
@@ -68,7 +68,7 @@ index 20293a710..df3e66bc0 100644
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
@@ -282,6 +283,126 @@ void curl_global_cleanup(void)
@@ -282,6 +283,161 @@ void curl_global_cleanup(void)
init_flags = 0;
}
@@ -121,6 +121,41 @@ index 20293a710..df3e66bc0 100644
+ "Accept-Encoding: gzip, deflate, br",
+ "Accept-Language: en-US,en;q=0.9"
+ }
+ },
+ {
+ .target = "edge98",
+ .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",
+ .http_headers = {
+ "sec-ch-ua: \" Not A;Brand\";v=\"99\", \"Chromium\";v=\"98\", \"Microsoft Edge\";v=\"98\"",
+ "sec-ch-ua-mobile: ?0",
+ "sec-ch-ua-platform: \"Windows\"",
+ "Upgrade-Insecure-Requests: 1",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.62",
+ "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.9",
+ "Sec-Fetch-Site: none",
+ "Sec-Fetch-Mode: navigate",
+ "Sec-Fetch-User: ?1",
+ "Sec-Fetch-Dest: document",
+ "Accept-Encoding: gzip, deflate, br",
+ "Accept-Language: en-US,en;q=0.9"
+ }
+ }
+};
+
@@ -195,7 +230,7 @@ index 20293a710..df3e66bc0 100644
/*
* curl_easy_init() is the external interface to alloc, setup and init an
* easy handle that is returned. If anything goes wrong, NULL is returned.
@@ -290,6 +411,7 @@ struct Curl_easy *curl_easy_init(void)
@@ -290,6 +446,7 @@ struct Curl_easy *curl_easy_init(void)
{
CURLcode result;
struct Curl_easy *data;
@@ -203,7 +238,7 @@ index 20293a710..df3e66bc0 100644
/* Make sure we inited the global SSL stuff */
if(!initialized) {
@@ -308,6 +430,22 @@ struct Curl_easy *curl_easy_init(void)
@@ -308,6 +465,22 @@ struct Curl_easy *curl_easy_init(void)
return NULL;
}
@@ -226,7 +261,7 @@ index 20293a710..df3e66bc0 100644
return data;
}
@@ -878,6 +1016,13 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
@@ -878,6 +1051,13 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
outcurl->state.referer_alloc = TRUE;
}

View File

@@ -195,6 +195,14 @@ class TestImpersonation:
"CURL_IMPERSONATE": "chrome98"
},
"chrome_98.0.4758.102_win10"
),
(
"./minicurl",
{
"LD_PRELOAD": "./chrome/libcurl-impersonate.so",
"CURL_IMPERSONATE": "edge98"
},
"edge_98.0.1108.62_win10"
)
]
)