Update util.c

This commit is contained in:
28Zaaky
2026-07-04 20:21:27 +02:00
committed by GitHub
parent e6b3cbec53
commit db44dc4048
+1 -7
View File
@@ -6,9 +6,7 @@
#ifndef CURLSSLOPT_NATIVE_CA
#define CURLSSLOPT_NATIVE_CA (1<<4)
#endif
#endif /* HTTP_ONLY */
/* ---- User-Agent rotation ---- */
#endif
static const char *k_ua[] = {
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
@@ -29,17 +27,14 @@ const char *random_ua(void)
}
#ifndef HTTP_ONLY
/* ---- JA3 hardening ---- */
void curl_apply_opsec(CURL *curl)
{
/* TLS 1.3 ciphers — Chrome order */
curl_easy_setopt(curl, CURLOPT_TLS13_CIPHERS,
"TLS_AES_128_GCM_SHA256:"
"TLS_AES_256_GCM_SHA384:"
"TLS_CHACHA20_POLY1305_SHA256");
/* TLS 1.2 ciphers — Chrome order */
curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST,
"ECDHE-ECDSA-AES128-GCM-SHA256:"
"ECDHE-RSA-AES128-GCM-SHA256:"
@@ -54,7 +49,6 @@ void curl_apply_opsec(CURL *curl)
"AES128-SHA:"
"AES256-SHA");
/* Windows native cert store — no curl-ca-bundle.crt on disk */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_NATIVE_CA);
}