Skip to content

The headless browser for AI agents and web scraping

fix(net): update compression dependencies without changing emulation profiles

SGavrl7c20597a9722
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dec642e8..01b8c434 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,7 +9,21 @@ permissions:
contents: read
jobs:
+ audit:
+ name: Audit release dependencies
+ runs-on: ubuntu-22.04
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
+ with:
+ persist-credentials: false
+ - uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2
+ with:
+ arguments: --all-features --config deny.toml
+ command: check advisories bans licenses sources
+
build:
+ needs: audit
strategy:
fail-fast: false
matrix:
diff --git a/Cargo.lock b/Cargo.lock
index 5d28467e..cba49c86 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -83,13 +83,19 @@ version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
+[[package]]
+name = "alloc-no-stdlib"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a"
+
[[package]]
name = "alloc-stdlib"
-version = "0.2.2"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
+checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1"
dependencies = [
- "alloc-no-stdlib",
+ "alloc-no-stdlib 3.0.0",
]
[[package]]
@@ -134,7 +140,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -145,7 +151,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -320,13 +326,13 @@ dependencies = [
[[package]]
name = "brotli"
-version = "8.0.3"
+version = "9.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8119e4516436f5708bbc474a9d395bf12f1b5395e93a92a56e647ac3388c8610"
+checksum = "627b7cfb0578f0eafce087a90fcd40add1231900b69e4d4de2d456260a4f5d81"
dependencies = [
- "alloc-no-stdlib",
+ "alloc-no-stdlib 3.0.0",
"alloc-stdlib",
- "brotli-decompressor",
+ "brotli-decompressor 6.2.0",
]
[[package]]
@@ -335,7 +341,16 @@ version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924"
dependencies = [
- "alloc-no-stdlib",
+ "alloc-no-stdlib 2.0.4",
+]
+
+[[package]]
+name = "brotli-decompressor"
+version = "6.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34c6783f42c21c952ad7112b354f0ba2f10760e9decea5b1b60523d6e270faaf"
+dependencies = [
+ "alloc-no-stdlib 3.0.0",
"alloc-stdlib",
]
@@ -544,9 +559,9 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
[[package]]
name = "compression-codecs"
-version = "0.4.38"
+version = "0.4.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf"
+checksum = "cae36683101b2899f48bd31f8db9839437356188e3b1ff23096e73dab09ba8fe"
dependencies = [
"brotli",
"compression-core",
@@ -558,9 +573,9 @@ dependencies = [
[[package]]
name = "compression-core"
-version = "0.4.32"
+version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789"
+checksum = "2ebdda89edc534bf8d5dd2857562633b6495557e5846552ade994b99ed13c36a"
[[package]]
name = "cooked-waker"
@@ -921,7 +936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1939,7 +1954,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -2127,6 +2142,7 @@ name = "obscura-net"
version = "0.1.0"
dependencies = [
"async-trait",
+ "compression-codecs",
"encoding_rs",
"futures-util",
"obscura-ssrf",
@@ -2840,7 +2856,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.12.1",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -3143,7 +3159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -3386,7 +3402,7 @@ dependencies = [
"getrandom 0.4.2",
"once_cell",
"rustix 1.1.4",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -4611,8 +4627,6 @@ dependencies = [
[[package]]
name = "wreq-util"
version = "3.0.0-rc.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baa5d2ab72139256916ca352a3d05c53d74e1dd360052eb5ba7691033c417c65"
dependencies = [
"brotli",
"flate2",
@@ -4633,7 +4647,7 @@ version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f625c6894838ab68e8c1c6e0f728e67363c9d4391cfa82333e58e6e30bc3a627"
dependencies = [
- "brotli-decompressor",
+ "brotli-decompressor 5.0.1",
"bytes",
"flate2",
]
@@ -4800,27 +4814,27 @@ dependencies = [
[[package]]
name = "zstd"
-version = "0.13.3"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
+checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "7.2.4"
+version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
+checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.16+zstd.1.5.7"
+version = "2.1.2+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
+checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
dependencies = [
"cc",
"pkg-config",
diff --git a/Cargo.toml b/Cargo.toml
index df15f6b8..bf899687 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,7 @@ members = [
"crates/obscura-cli",
"crates/obscura",
]
+exclude = ["vendor/taffy", "vendor/cosmic-text", "vendor/wreq-util"]
[workspace.package]
version = "0.1.0"
@@ -35,7 +36,7 @@ selectors = "0.26"
servo_arc = "0.4"
cssparser = "0.34"
# Layout engine for the optional render layer (obscura-render). Pure Rust.
-taffy = "0.12"
+taffy = { version = "0.12", path = "vendor/taffy" }
# CPU-only pure-Rust 2D rasterizer for the render layer's paint step.
tiny-skia = "0.12"
# Pure-Rust glyph rasterizer for the render layer's text step.
@@ -58,13 +59,6 @@ thiserror = "2"
anyhow = "1"
base64 = "0.22"
-[patch.crates-io]
-# Keep the grid shrink-to-fit correction local until it lands upstream.
-taffy = { path = "vendor/taffy" }
-# Carry the same canonical variable-font coordinates through shaping and
-# rasterization until the upstream API exposes them.
-cosmic-text = { path = "vendor/cosmic-text" }
-
# Unwinding (the Rust default) is REQUIRED for the anti-panic protocol: ops wrap
# their bodies in std::panic::catch_unwind so a panic degrades to an error return
# instead of unwinding into V8's FFI frame and aborting the process. panic="abort"
diff --git a/crates/obscura-net/Cargo.toml b/crates/obscura-net/Cargo.toml
index 3bc5119b..28f7b63f 100644
--- a/crates/obscura-net/Cargo.toml
+++ b/crates/obscura-net/Cargo.toml
@@ -12,6 +12,8 @@ stealth = ["wreq", "wreq-util", "futures-util"]
[dependencies]
obscura-ssrf = { workspace = true }
reqwest = { workspace = true }
+# Keep embedded consumers above the vulnerable transitive zstd requirements.
+compression-codecs = { version = "0.4.46", default-features = false }
tokio = { workspace = true }
url = { workspace = true }
serde = { workspace = true }
@@ -28,7 +30,7 @@ futures-util = { version = "0.3", optional = true }
# Emulation builder reshuffled). A caret requirement let a fresh resolve pull a
# newer, incompatible rc and broke `cargo build --features stealth` (issue #234).
# Pin exact versions so the build always resolves to the API wreq_client.rs targets.
-wreq-util = { version = "=3.0.0-rc.12", optional = true, features = ["emulation-compression"] }
+wreq-util = { path = "../../vendor/wreq-util", version = "=3.0.0-rc.12", optional = true, features = ["emulation-compression"] }
[dev-dependencies]
socket2 = "0.6"
diff --git a/crates/obscura-net/tests/compressed_responses.rs b/crates/obscura-net/tests/compressed_responses.rs
new file mode 100644
index 00000000..87eb4576
--- /dev/null
+++ b/crates/obscura-net/tests/compressed_responses.rs
@@ -0,0 +1,156 @@
+use std::sync::Arc;
+use obscura_net::{CookieJar, ObscuraHttpClient};
+use tokio::io::{AsyncReadExt, AsyncWriteExt};
+
+// Each fixed stream decodes to all byte values repeated four times.
+// Generated independently with gzip, Brotli, and Zstandard encoders.
+const GZIP: &[u8] = &[
+ 31, 139, 8, 0, 0, 0, 0, 0, 2, 255, 99, 96, 100, 98, 102, 97, 101, 99, 231, 224,
+ 228, 226, 230, 225, 229, 227, 23, 16, 20, 18, 22, 17, 21, 19, 151, 144, 148, 146, 150, 145,
+ 149, 147, 87, 80, 84, 82, 86, 81, 85, 83, 215, 208, 212, 210, 214, 209, 213, 211, 55, 48,
+ 52, 50, 54, 49, 53, 51, 183, 176, 180, 178, 182, 177, 181, 179, 119, 112, 116, 114, 118, 113,
+ 117, 115, 247, 240, 244, 242, 246, 241, 245, 243, 15, 8, 12, 10, 14, 9, 13, 11, 143, 136,
+ 140, 138, 142, 137, 141, 139, 79, 72, 76, 74, 78, 73, 77, 75, 207, 200, 204, 202, 206, 201,
+ 205, 203, 47, 40, 44, 42, 46, 41, 45, 43, 175, 168, 172, 170, 174, 169, 173, 171, 111, 104,
+ 108, 106, 110, 105, 109, 107, 239, 232, 236, 234, 238, 233, 237, 235, 159, 48, 113, 210, 228, 41,
+ 83, 167, 77, 159, 49, 115, 214, 236, 57, 115, 231, 205, 95, 176, 112, 209, 226, 37, 75, 151,
+ 45, 95, 177, 114, 213, 234, 53, 107, 215, 173, 223, 176, 113, 211, 230, 45, 91, 183, 109, 223,
+ 177, 115, 215, 238, 61, 123, 247, 237, 63, 112, 240, 208, 225, 35, 71, 143, 29, 63, 113, 242,
+ 212, 233, 51, 103, 207, 157, 191, 112, 241, 210, 229, 43, 87, 175, 93, 191, 113, 243, 214, 237,
+ 59, 119, 239, 221, 127, 240, 240, 209, 227, 39, 79, 159, 61, 127, 241, 242, 213, 235, 55, 111,
+ 223, 189, 255, 240, 241, 211, 231, 47, 95, 191, 125, 255, 241, 243, 215, 239, 63, 127, 255, 253,
+ 103, 24, 245, 255, 168, 255, 71, 176, 255, 1, 38, 76, 11, 183, 0, 4, 0, 0,
+];
+
+const BROTLI: &[u8] = &[
+ 27, 255, 3, 0, 100, 64, 110, 150, 159, 151, 154, 76, 164, 33, 190, 52, 154, 224, 199, 5,
+ 0, 4, 129, 33, 80, 24, 124, 126, 12, 0, 225, 79, 46, 4, 18, 133, 198, 96, 113, 120,
+ 2, 145, 68, 166, 80, 105, 116, 6, 70, 38, 102, 22, 86, 54, 118, 14, 78, 46, 110, 30,
+ 94, 62, 126, 1, 65, 33, 97, 17, 81, 49, 113, 9, 73, 41, 105, 25, 89, 57, 121, 5,
+ 69, 37, 101, 21, 85, 53, 117, 13, 77, 45, 109, 29, 93, 61, 125, 3, 67, 35, 99, 19,
+ 83, 51, 115, 11, 75, 43, 107, 27, 91, 59, 123, 7, 71, 39, 103, 23, 87, 55, 119, 15,
+ 79, 47, 111, 31, 95, 63, 255, 128, 192, 160, 224, 144, 208, 176, 240, 136, 200, 168, 232, 152,
+ 216, 184, 248, 132, 196, 164, 228, 148, 212, 180, 244, 140, 204, 172, 236, 156, 220, 188, 252, 130,
+ 194, 162, 226, 146, 210, 178, 242, 138, 202, 170, 234, 154, 218, 186, 250, 134, 198, 166, 230, 150,
+ 214, 182, 246, 142, 206, 174, 238, 158, 222, 190, 254, 129, 193, 161, 225, 145, 209, 177, 241, 137,
+ 201, 169, 233, 153, 217, 185, 249, 133, 197, 165, 229, 149, 213, 181, 245, 141, 205, 173, 237, 157,
+ 221, 189, 253, 131, 195, 163, 227, 147, 211, 179, 243, 139, 203, 171, 235, 155, 219, 187, 251, 135,
+ 199, 167, 231, 151, 215, 183, 247, 143, 207, 175, 239, 159, 223, 191, 127, 64, 3,
+];
+
+#[cfg(feature = "stealth")]
+const ZSTD: &[u8] = &[
+ 40, 181, 47, 253, 96, 0, 3, 85, 8, 0, 4, 16, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 1, 0, 0, 253, 6, 170, 53, 5,
+];
+
+
+async fn compressed_responses(stealth: bool) {
+ let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
+ let url = url::Url::parse(&format!("http://{}/", listener.local_addr().unwrap())).unwrap();
+ #[allow(unused_mut)]
+ let mut cases = vec![("gzip", GZIP), ("br", BROTLI)];
+ #[cfg(feature = "stealth")]
+ if stealth { cases.push(("zstd", ZSTD)); }
+ #[cfg(not(feature = "stealth"))]
+ { assert!(!stealth); }
+ let requests = cases.iter().flat_map(|(encoding, bytes)| {
+ [(*encoding, bytes.to_vec()), (*encoding, b"invalid compressed stream".to_vec()),
+ (*encoding, bytes.to_vec())]
+ }).collect::<Vec<_>>();
+ let fixture = tokio::spawn(async move {
+ for (encoding, bytes) in requests {
+ let (mut socket, _) = listener.accept().await.unwrap();
+ let mut request = Vec::new();
+ let mut chunk = [0; 1024];
+ while !request.windows(4).any(|bytes| bytes == b"\r\n\r\n") {
+ let n = socket.read(&mut chunk).await.unwrap();
+ assert!(n > 0);
+ request.extend_from_slice(&chunk[..n]);
+ }
+ socket.write_all(format!(
+ "HTTP/1.1 200 OK\r\nContent-Encoding: {encoding}\r\nContent-Type: application/octet-stream\r\nContent-Length: {}\r\nConnection: close\r\n\r\n",
+ bytes.len()
+ ).as_bytes()).await.unwrap();
+ socket.write_all(&bytes).await.unwrap();
+ socket.shutdown().await.unwrap();
+ }
+ });
+ let client = ObscuraHttpClient::with_full_options(Arc::new(CookieJar::new()), None, true);
+ #[cfg(feature = "stealth")]
+ let stealth_client = obscura_net::StealthHttpClient::with_proxy(
+ Arc::new(CookieJar::new()), None, true
+ );
+ let expected: Vec<u8> = (0..4).flat_map(|_| 0..=255u8).collect();
+ for (encoding, _) in cases {
+ for valid in [true, false, true] {
+ #[cfg(feature = "stealth")]
+ let response = if stealth { stealth_client.fetch(&url).await } else { client.fetch(&url).await };
+ #[cfg(not(feature = "stealth"))]
+ let response = client.fetch(&url).await;
+ assert_eq!(client.active_requests(), 0, "{encoding}: native request leaked");
+ #[cfg(feature = "stealth")]
+ assert_eq!(stealth_client.active_requests(), 0, "{encoding}: stealth request leaked");
+ if valid {
+ let response = response.expect(encoding);
+ assert_eq!(response.status, 200);
+ assert_eq!(response.body, expected, "{encoding}: binary response changed");
+ } else {
+ assert!(response.is_err(), "{encoding}: invalid stream was accepted");
+ }
+ }
+ }
+ fixture.await.unwrap();
+}
+
+#[tokio::test]
+async fn native_compressed_responses_recover_after_decode_errors() {
+ tokio::time::timeout(std::time::Duration::from_secs(10), compressed_responses(false)).await.unwrap();
+}
+
+#[cfg(feature = "stealth")]
+#[tokio::test]
+async fn stealth_compressed_responses_recover_after_decode_errors() {
+ tokio::time::timeout(std::time::Duration::from_secs(10), compressed_responses(true)).await.unwrap();
+}
+
+#[cfg(feature = "stealth")]
+#[test]
+fn tls_certificate_codecs_preserve_bytes_and_reject_corrupt_streams() {
+ use wreq::tls::compress::{CertificateCompressor, Codec};
+ use wreq_util::emulate::compress::{BrotliCompressor, ZstdCompressor};
+
+ fn decode(codec: &Codec, input: &[u8]) -> std::io::Result<Vec<u8>> {
+ let mut output = Vec::new();
+ match codec {
+ Codec::Pointer(call) => call(input, &mut output)?,
+ Codec::Dynamic(call) => call(input, &mut output)?,
+ }
+ Ok(output)
+ }
+
+ let expected: Vec<u8> = (0..4).flat_map(|_| 0..=255u8).collect();
+ for (compressor, stream) in [
+ (&BrotliCompressor as &dyn CertificateCompressor, BROTLI),
+ (&ZstdCompressor as &dyn CertificateCompressor, ZSTD),
+ ] {
+ let decoder = compressor.decompress();
+ assert_eq!(decode(&decoder, stream).unwrap(), expected);
+ assert!(decode(&decoder, b"invalid compressed certificate").is_err());
+ assert_eq!(decode(&decoder, stream).unwrap(), expected);
+ let encoded = decode(&compressor.compress(), &expected).unwrap();
+ assert_eq!(decode(&decoder, &encoded).unwrap(), expected);
+ }
+}
diff --git a/crates/obscura-render/Cargo.toml b/crates/obscura-render/Cargo.toml
index d152b7db..a9f4c6a8 100644
--- a/crates/obscura-render/Cargo.toml
+++ b/crates/obscura-render/Cargo.toml
@@ -22,7 +22,7 @@ ab_glyph = { workspace = true, optional = true }
# Real inline text layout: HarfBuzz-class shaping (rustybuzz) + UAX#14 line
# breaking, the same algorithms browsers use. Built with only our embedded
# fonts (no system-font scan) so layout stays deterministic across hosts.
-cosmic-text = { version = "=0.14.2", default-features = false, features = ["std", "swash", "shape-run-cache"], optional = true }
+cosmic-text = { version = "=0.14.2", path = "../../vendor/cosmic-text", default-features = false, features = ["std", "swash", "shape-run-cache"], optional = true }
# Keep this exactly aligned with cosmic-text 0.14's raster backend. Cosmic
# and the renderer consume the same canonical variation coordinates for
# shaping and rasterization.
diff --git a/vendor/wreq-util/.cargo_vcs_info.json b/vendor/wreq-util/.cargo_vcs_info.json
new file mode 100644
index 00000000..61973792
--- /dev/null
+++ b/vendor/wreq-util/.cargo_vcs_info.json
@@ -0,0 +1,6 @@
+{
+ "git": {
+ "sha1": "f43b41539d3ded0701c06a74264db0c8e7e63bcf"
+ },
+ "path_in_vcs": ""
+}
\ No newline at end of file
diff --git a/vendor/wreq-util/.github/FUNDING.yml b/vendor/wreq-util/.github/FUNDING.yml
new file mode 100644
index 00000000..768ac2ce
--- /dev/null
+++ b/vendor/wreq-util/.github/FUNDING.yml
@@ -0,0 +1,15 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi:
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
+polar: # Replace with a single Polar username
+buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
+thanks_dev: # Replace with a single thanks.dev username
+custom: ['https://github.com/0x676e67/0x676e67/blob/main/SPONSOR.md']
diff --git a/vendor/wreq-util/.github/ISSUE_TEMPLATE/bug_report.md b/vendor/wreq-util/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..dd84ea78
--- /dev/null
+++ b/vendor/wreq-util/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,38 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+ - Device: [e.g. iPhone6]
+ - OS: [e.g. iOS8.1]
+ - Browser [e.g. stock browser, safari]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/vendor/wreq-util/.github/ISSUE_TEMPLATE/custom.md b/vendor/wreq-util/.github/ISSUE_TEMPLATE/custom.md
new file mode 100644
index 00000000..48d5f81f
--- /dev/null
+++ b/vendor/wreq-util/.github/ISSUE_TEMPLATE/custom.md
@@ -0,0 +1,10 @@
+---
+name: Custom issue template
+about: Describe this issue template's purpose here.
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+
diff --git a/vendor/wreq-util/.github/ISSUE_TEMPLATE/feature_request.md b/vendor/wreq-util/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 00000000..bbcbbe7d
--- /dev/null
+++ b/vendor/wreq-util/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/vendor/wreq-util/.github/dependabot.yml b/vendor/wreq-util/.github/dependabot.yml
new file mode 100644
index 00000000..9ffca926
--- /dev/null
+++ b/vendor/wreq-util/.github/dependabot.yml
@@ -0,0 +1,22 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ # Workflow files stored in the
+ # default location of `.github/workflows`
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "cargo"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ # todo: if only this worked, see https://github.com/dependabot/dependabot-core/issues/4009
+ # only tell us if there's a new 'breaking' change we could upgrade to
+ # versioning-strategy: increase-if-necessary
+ # disable regular version updates, security updates are unaffected
+ open-pull-requests-limit: 0
diff --git a/vendor/wreq-util/.github/workflows/ci.yml b/vendor/wreq-util/.github/workflows/ci.yml
new file mode 100644
index 00000000..50a409b7
--- /dev/null
+++ b/vendor/wreq-util/.github/workflows/ci.yml
@@ -0,0 +1,82 @@
+name: CI
+
+on:
+ push:
+ tags: ["v*"]
+ pull_request:
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: true
+
+permissions:
+ contents: write
+ packages: write
+
+jobs:
+ style:
+ name: Style
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Style check
+ run: cargo fmt --all -- --check
+ - name: Clippy check
+ run: cargo clippy --all-targets --all-features
+
+ docs:
+ name: Docs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Build docs
+ run: cargo doc --document-private-items --all-features
+
+ tests:
+ name: Tests
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - uses: taiki-e/install-action@v2
+ with:
+ tool: cargo-nextest
+ - name: Tests
+ run: |
+ set -euxo pipefail
+ cargo nextest run --workspace
+
+ linux:
+ name: Linux
+ needs: [style, tests, docs]
+ runs-on: ubuntu-latest
+ environment: Linux
+ if: startsWith(github.ref, 'refs/tags/')
+ steps:
+ - uses: actions/checkout@v6
+ - uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - uses: katyo/publish-crates@v2
+ with:
+ registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+ ignore-unpublished-changes: true
+ - name: Upload binaries to GitHub Release
+ uses: softprops/action-gh-release@v3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
+ generate_release_notes: true
diff --git a/vendor/wreq-util/.github/workflows/release-plz.yml b/vendor/wreq-util/.github/workflows/release-plz.yml
new file mode 100644
index 00000000..604e4bcf
--- /dev/null
+++ b/vendor/wreq-util/.github/workflows/release-plz.yml
@@ -0,0 +1,52 @@
+name: Release-plz
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ release-plz-release:
+ name: Release-plz release
+ runs-on: ubuntu-latest
+ if: ${{ github.repository_owner == '0x676e67' }}
+ permissions:
+ contents: write
+ id-token: write
+ steps:
+ - &checkout
+ name: Checkout repository
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ persist-credentials: true
+ token: ${{ secrets.RELEASE_PLZ_TOKEN }}
+ - &install-rust
+ name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+ - name: Run release-plz
+ uses: release-plz/[email protected]
+ with:
+ command: release
+ env:
+ GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
+
+ release-plz-pr:
+ name: Release-plz PR
+ runs-on: ubuntu-latest
+ if: ${{ github.repository_owner == '0x676e67' }}
+ permissions:
+ pull-requests: write
+ contents: write
+ concurrency:
+ group: release-plz-${{ github.ref }}
+ cancel-in-progress: false
+ steps:
+ - *checkout
+ - *install-rust
+ - name: Run release-plz
+ uses: release-plz/[email protected]
+ with:
+ command: release-pr
+ env:
+ GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
diff --git a/vendor/wreq-util/.gitignore b/vendor/wreq-util/.gitignore
new file mode 100644
index 00000000..6a828813
--- /dev/null
+++ b/vendor/wreq-util/.gitignore
@@ -0,0 +1,24 @@
+# Generated by Cargo
+# will have compiled files and executables
+debug
+target
+Cargo.lock
+
+# These are backup files generated by rustfmt
+**/*.rs.bk
+
+# MSVC Windows builds of rustc generate these, which store debugging information
+*.pdb
+
+# Generated by cargo mutants
+# Contains mutation testing data
+**/mutants.out*/
+
+# RustRover
+# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
+# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
+# and can be added to the global gitignore or merged into this file. For a more nuclear
+# option (not recommended) you can uncomment the following to ignore the entire idea folder.
+#.idea/
+.vscode
+.zed
diff --git a/vendor/wreq-util/CHANGELOG.md b/vendor/wreq-util/CHANGELOG.md
new file mode 100644
index 00000000..fb5df293
--- /dev/null
+++ b/vendor/wreq-util/CHANGELOG.md
@@ -0,0 +1,54 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [3.0.0-rc.12](https://github.com/0x676e67/wreq-util/compare/v3.0.0-rc.11...v3.0.0-rc.12) - 2026-06-03
+
+### Added
+
+- *(emulate)* Add Firefox 150-151 ([#93](https://github.com/0x676e67/wreq-util/pull/93))
+- *(emulate)* Add Chrome/Edge 148,Opera 131,Safari 26-2/4 ([#92](https://github.com/0x676e67/wreq-util/pull/92))
+- *(emulate)* export enum variants ([#87](https://github.com/0x676e67/wreq-util/pull/87))
+- *(emulation)* add Chrome and Edge 146-147 ([#86](https://github.com/0x676e67/wreq-util/pull/86))
+- *(emulation)* add Opera 120-130 and Firefox 148-149 support ([#82](https://github.com/0x676e67/wreq-util/pull/82))
+
+### Fixed
+
+- *(emulate)* fix HTTP2 configuration for OkHttp ([#94](https://github.com/0x676e67/wreq-util/pull/94))
+- fix build
+- fix chrome grease value and brand order ([#91](https://github.com/0x676e67/wreq-util/pull/91))
+- fix
+
+### Other
+
+- Update Cargo.toml
+- Update Cargo.toml
+- Update README.md
+- fix docs build ([#95](https://github.com/0x676e67/wreq-util/pull/95))
+- Update wreq and wreq-util versions in README
+- release-plz.yml
+- *(deps)* bump softprops/action-gh-release from 2 to 3 ([#89](https://github.com/0x676e67/wreq-util/pull/89))
+- Add Discord chat badge to README
+- Add rustfmt configuration settings
+- Update issue submission instructions in README
+- Update Cargo.toml
+- Update copyright year and owner in LICENSE file
+- Revise contributing section and add FAQ
+- Update Apache-2.0
+- export
+- Update Cargo.toml
+- update deps
+- update
+- *(macros)* fmt code ([#85](https://github.com/0x676e67/wreq-util/pull/85))
+- *(macros)* fmt code
+- Fix variable naming in emulate.rs
+- *(emulation)* refine abstraction for emulation settings ([#84](https://github.com/0x676e67/wreq-util/pull/84))
+- fmt
+- Change 'Overview' header to 'Features'
+- *(mod)* use `emulate` when applying `emulation` ([#83](https://github.com/0x676e67/wreq-util/pull/83))
+- Update `Contributing` section in `README.md` ([#81](https://github.com/0x676e67/wreq-util/pull/81))
diff --git a/vendor/wreq-util/Cargo.toml b/vendor/wreq-util/Cargo.toml
new file mode 100644
index 00000000..0ff8a6b4
--- /dev/null
+++ b/vendor/wreq-util/Cargo.toml
@@ -0,0 +1,167 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2024"
+rust-version = "1.85"
+name = "wreq-util"
+version = "3.0.0-rc.12"
+authors = ["0x676e67 <[email protected]>"]
+build = false
+autolib = false
+autobins = false
+autoexamples = false
+autotests = false
+autobenches = false
+description = "Common utilities for wreq"
+documentation = "https://docs.rs/wreq-util"
+readme = "README.md"
+keywords = [
+ "http",
+ "client",
+ "emulation",
+ "ja3",
+ "ja4",
+]
+license = "Apache-2.0"
+repository = "https://github.com/0x676e67/wreq-util"
+
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = [
+ "--cfg",
+ "docsrs",
+]
+targets = ["x86_64-unknown-linux-gnu"]
+
+[features]
+compio-rt = ["wreq/compio-rt"]
+default = ["emulation"]
+emulation = [
+ "dep:typed-builder",
+ "dep:brotli",
+ "dep:flate2",
+ "dep:zstd",
+]
+emulation-compression = []
+emulation-serde = ["dep:serde"]
+tokio-rt = ["wreq/tokio-rt"]
+tower-delay = [
+ "dep:tower",
+ "dep:pin-project-lite",
+ "tokio/time",
+]
+
+[lib]
+name = "wreq_util"
+path = "src/lib.rs"
+doctest = false
+
+[[example]]
+name = "emulate"
+path = "examples/emulate.rs"
+required-features = ["emulation"]
+
+[[example]]
+name = "tower_delay"
+path = "examples/tower_delay.rs"
+required-features = ["tower-delay"]
+
+[[test]]
+name = "client"
+path = "tests/client.rs"
+
+[[test]]
+name = "emulate_chrome"
+path = "tests/emulate_chrome.rs"
+
+[[test]]
+name = "emulate_firefox"
+path = "tests/emulate_firefox.rs"
+
+[[test]]
+name = "emulate_okhttp"
+path = "tests/emulate_okhttp.rs"
+
+[[test]]
+name = "emulate_opera"
+path = "tests/emulate_opera.rs"
+
+[[test]]
+name = "emulate_safari"
+path = "tests/emulate_safari.rs"
+
+[dependencies.brotli]
+version = "9.0.0"
+optional = true
+
+[dependencies.flate2]
+version = "1.1.9"
+optional = true
+
+[dependencies.pin-project-lite]
+version = "0.2.17"
+optional = true
+
+[dependencies.serde]
+version = "1.0.228"
+features = ["derive"]
+optional = true
+
+[dependencies.tokio]
+version = "1.52.1"
+optional = true
+default-features = false
+
+[dependencies.tower]
+version = "0.5.2"
+optional = true
+default-features = false
+
+[dependencies.typed-builder]
+version = "0.23.2"
+optional = true
+
+[dependencies.wreq]
+version = "6.0.0-rc"
+default-features = false
+
+[dependencies.zstd]
+version = "0.14.3"
+optional = true
+
+[dev-dependencies.http]
+version = "1"
+
+[dev-dependencies.hyper]
+version = "1.10.1"
+features = [
+ "http1",
+ "http2",
+ "server",
+]
+default-features = false
+
+[dev-dependencies.hyper-util]
+version = "0.1.20"
+features = [
+ "http1",
+ "http2",
+ "server-auto",
+ "tokio",
+]
+
+[dev-dependencies.tokio]
+version = "1.48.0"
+features = ["full"]
+
+[dev-dependencies.wreq]
+version = "6.0.0-rc"
diff --git a/vendor/wreq-util/Cargo.toml.orig b/vendor/wreq-util/Cargo.toml.orig
new file mode 100644
index 00000000..3aaa4a34
--- /dev/null
+++ b/vendor/wreq-util/Cargo.toml.orig
@@ -0,0 +1,94 @@
+[package]
+name = "wreq-util"
+description = "Common utilities for wreq"
+repository = "https://github.com/0x676e67/wreq-util"
+documentation = "https://docs.rs/wreq-util"
+keywords = ["http", "client", "emulation", "ja3", "ja4"]
+authors = ["0x676e67 <[email protected]>"]
+version = "3.0.0-rc.12"
+readme = "README.md"
+license = "Apache-2.0"
+edition = "2024"
+rust-version = "1.85"
+
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
+targets = ["x86_64-unknown-linux-gnu"]
+
+[features]
+default = ["emulation"]
+
+tokio-rt = ["wreq/tokio-rt"]
+compio-rt = ["wreq/compio-rt"]
+
+emulation = ["dep:typed-builder", "dep:brotli", "dep:flate2", "dep:zstd"]
+emulation-serde = ["dep:serde"]
+emulation-compression = []
+
+tower-delay = ["dep:tower", "dep:pin-project-lite", "tokio/time"]
+
+[dependencies]
+wreq = { version = "6.0.0-rc", default-features = false }
+
+# Optional deps...
+
+serde = { version = "1.0.228", features = ["derive"], optional = true }
+tokio = { version = "1.52.1", default-features = false, optional = true }
+tower = { version = "0.5.2", default-features = false, optional = true }
+typed-builder = { version = "0.23.2", optional = true }
+pin-project-lite = { version = "0.2.17", optional = true }
+
+## Compression algorithms
+brotli = { version = "8.0.2", optional = true }
+flate2 = { version = "1.1.9", optional = true }
+zstd = { version = "0.13.3", optional = true }
+
+[dev-dependencies]
+wreq = "6.0.0-rc"
+tokio = { version = "1.48.0", features = ["full"] }
+hyper = { version = "1.10.1", default-features = false, features = [
+ "http1",
+ "http2",
+ "server",
+] }
+hyper-util = { version = "0.1.20", features = [
+ "http1",
+ "http2",
+ "server-auto",
+ "tokio",
+] }
+http = "1"
+
+[lib]
+doctest = false
+
+[[test]]
+name = "client"
+path = "tests/client.rs"
+
+[[test]]
+name = "emulate_chrome"
+path = "tests/emulate_chrome.rs"
+
+[[test]]
+name = "emulate_okhttp"
+path = "tests/emulate_okhttp.rs"
+
+[[test]]
+name = "emulate_firefox"
+path = "tests/emulate_firefox.rs"
+
+[[test]]
+name = "emulate_safari"
+path = "tests/emulate_safari.rs"
+
+[[example]]
+name = "emulate"
+path = "examples/emulate.rs"
+required-features = ["emulation"]
+
+[[example]]
+name = "tower_delay"
+path = "examples/tower_delay.rs"
+required-features = ["tower-delay"]
diff --git a/vendor/wreq-util/LICENSE b/vendor/wreq-util/LICENSE
new file mode 100644
index 00000000..b94601ae
--- /dev/null
+++ b/vendor/wreq-util/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2026 0x676e67 <[email protected]>
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/wreq-util/README.md b/vendor/wreq-util/README.md
new file mode 100644
index 00000000..7d32a286
--- /dev/null
+++ b/vendor/wreq-util/README.md
@@ -0,0 +1,62 @@
+# wreq-util
+
+A collection of utilities to do common things with [wreq](https://github.com/0x676e67/wreq).
+
+[![Crates.io](https://img.shields.io/crates/v/wreq-util.svg?logo=rust)](https://crates.io/crates/wreq-util)
+[![GitHub License](https://img.shields.io/github/license/0x676e67/wreq-util)](https://github.com/0x676e67/wreq-util/blob/main/LICENSE)
+[![Discord chat][discord-badge]][discord-url]
+
+[discord-badge]: https://img.shields.io/discord/1486741856397164788.svg?logo=discord
+[discord-url]: https://discord.gg/rfbvyFkgq3
+
+See the [crate documentation](https://docs.rs/wreq-util/latest/wreq_util) for more details.
+
+## Features
+
+**wreq-util** offers a set of [tower](https://github.com/tower-rs/tower) middleware and utilities designed specifically for the [wreq](https://github.com/0x676e67/wreq) HTTP client:
+
+- **Emulation** various mainstream browsers (Chrome, Firefox, Safari, Opera, OkHttp) and their versions.
+- **Delay/JitterDelay**: Add fixed or jittered delays to HTTP [request](https://docs.rs/http/latest/http/request/index.html) with customizable strategies and predicates.
+
+## Example
+
+The following example uses the [Tokio](https://tokio.rs) runtime with optional features enabled by adding this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+tokio = { version = "1", features = ["full"] }
+wreq = "6.0.0-rc"
+wreq-util = "3.0.0-rc"
+```
+
+And then the code:
+
+```rust
+use wreq::Client;
+use wreq_util::Emulation;
+
+#[tokio::main]
+async fn main() -> wreq::Result<()> {
+ // Build a client
+ let client = Client::builder()
+ .emulation(Emulation::Chrome147)
+ .build()?;
+
+ // Use the API you're already familiar with
+ let resp = client.get("https://www.google.com").send().await?;
+ println!("{}", resp.text().await?);
+ Ok(())
+}
+```
+
+## License
+
+Licensed under either of Apache License, Version 2.0 ([LICENSE](./LICENSE) or http://www.apache.org/licenses/LICENSE-2.0).
+
+## Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the [Apache-2.0](./LICENSE) license, shall be licensed as above, without any additional terms or conditions.
+
+## FAQ
+
+**For all issues and feedback, please head over to the [wreq](https://github.com/0x676e67/wreq) repository.**
diff --git a/vendor/wreq-util/examples/emulate.rs b/vendor/wreq-util/examples/emulate.rs
new file mode 100644
index 00000000..062d1759
--- /dev/null
+++ b/vendor/wreq-util/examples/emulate.rs
@@ -0,0 +1,39 @@
+use wreq_util::{Emulation, Platform, Profile};
+
+#[tokio::main]
+async fn main() -> Result<(), wreq::Error> {
+ // Example 1: Basic emulation - Safari26
+ let text = wreq::get("https://tls.browserleaks.com/")
+ .emulation(Emulation::Safari26)
+ .send()
+ .await?
+ .text()
+ .await?;
+ println!("{}\n", text);
+
+ // Example 2: Advanced emulation with options - OkHttp5
+ let text = wreq::get("https://tls.peet.ws/api/all")
+ .emulation(
+ Emulation::builder()
+ .profile(Profile::OkHttp5)
+ .platform(Platform::Windows)
+ .http2(false)
+ .build(),
+ )
+ .send()
+ .await?
+ .text()
+ .await?;
+ println!("{}\n", text);
+
+ // Example 3: Random device emulation
+ let text = wreq::get("https://tls.peet.ws/api/all")
+ .emulation(Emulation::random())
+ .send()
+ .await?
+ .text()
+ .await?;
+ println!("{}", text);
+
+ Ok(())
+}
diff --git a/vendor/wreq-util/examples/tower_delay.rs b/vendor/wreq-util/examples/tower_delay.rs
new file mode 100644
index 00000000..4a22c679
--- /dev/null
+++ b/vendor/wreq-util/examples/tower_delay.rs
@@ -0,0 +1,191 @@
+use std::time::{Duration, Instant};
+use wreq::Client;
+use wreq_util::tower::delay::{DelayLayer, JitterDelayLayer};
+
+#[tokio::main]
+async fn main() -> Result<(), wreq::Error> {
+ // Build a client with a 1 second delay between requests
+ let client = Client::builder()
+ .layer(DelayLayer::new(Duration::from_secs(1)))
+ .tls_cert_verification(false)
+ .build()?;
+
+ let url = "https://httpbin.io/get";
+ println!("Sending 3 requests to {} using DelayLayer(1s)", url);
+
+ let mut prev_start = Instant::now();
+
+ for i in 1..=3 {
+ let start = Instant::now();
+ let delta = start.duration_since(prev_start);
+ println!("Request #{}, start (+{:.3}s)", i, delta.as_secs_f64());
+
+ let _ = client.get(url).send().await?;
+
+ println!(
+ "Request #{}, completed in {:.3}s",
+ i,
+ start.elapsed().as_secs_f64()
+ );
+
+ prev_start = start;
+ }
+
+ // Example 1: Basic jittered delay for all requests
+ basic_jitter_delay().await?;
+
+ println!("\n{}\n", "=".repeat(60));
+
+ // Example 2: Conditional jittered delay using `when`
+ conditional_jitter_delay().await?;
+
+ println!("\n{}\n", "=".repeat(60));
+
+ // Example 3: Conditional fixed delay using `when`
+ conditional_fixed_delay().await?;
+
+ Ok(())
+}
+
+/// Demonstrates basic jittered delay aplied to all requests.
+async fn basic_jitter_delay() -> Result<(), wreq::Error> {
+ println!("=== Basic Jittered Delay ===\n");
+
+ // Build a client with jittered delay: base 1s ± 50% (range: 0.5s to 1.5s)
+ let client = Client::builder()
+ .layer(JitterDelayLayer::new(Duration::from_secs(1), 0.5))
+ .tls_cert_verification(false)
+ .build()?;
+
+ let url = "https://httpbin.io/get";
+ println!(
+ "Sending 3 requests to {} using JitterDelayLayer(1s ± 50%)",
+ url
+ );
+ println!("Expected delay range: [0.5s, 1.5s]\n");
+
+ let mut prev_start = Instant::now();
+
+ for i in 1..=3 {
+ let start = Instant::now();
+ let delta = start.duration_since(prev_start);
+
+ if i > 1 {
+ println!(
+ "Request #{}: delay since last = {:.3}s",
+ i,
+ delta.as_secs_f64()
+ );
+ } else {
+ println!("Request #{}: starting...", i);
+ }
+
+ let _ = client.get(url).send().await?;
+
+ println!(
+ "Request #{}: completed in {:.3}s\n",
+ i,
+ start.elapsed().as_secs_f64()
+ );
+
+ prev_start = start;
+ }
+
+ println!("Notice how the delays vary randomly within the [0.5s, 1.5s] range.");
+
+ Ok(())
+}
+
+/// Demonstrates conditional jittered delay using `when` predicate.
+async fn conditional_jitter_delay() -> Result<(), wreq::Error> {
+ println!("=== Conditional Jittered Delay (using `JitterDelayLayer::when`) ===\n");
+
+ let client = Client::builder()
+ .layer(JitterDelayLayer::new(Duration::from_millis(800), 0.3).when(
+ |req: &http::Request<_>| {
+ // Only apply delay to POST requests
+ req.method() == http::Method::POST
+ },
+ ))
+ .tls_cert_verification(false)
+ .build()?;
+
+ const BASE_URL: &str = "https://httpbin.io";
+
+ println!("POST requests will have jittered delay (800ms ± 30%)");
+ println!("GET requests will pass through immediately\n");
+
+ // Send alternating GET and POST requests
+ for i in 1..=4 {
+ let start = Instant::now();
+
+ if i % 2 == 1 {
+ // GET request - no delay expected
+ let url = format!("{BASE_URL}/get");
+ println!("Request #{}: GET {}", i, url);
+ let _ = client.get(&url).send().await?;
+ } else {
+ // POST request - delay expected
+ let url = format!("{BASE_URL}/post");
+ println!("Request #{}: POST {}", i, url);
+ let _ = client.post(&url).send().await?;
+ }
+
+ println!(
+ "Request #{}: completed in {:.3}s ({})\n",
+ i,
+ start.elapsed().as_secs_f64(),
+ if i % 2 == 1 { "no delay" } else { "with delay" }
+ );
+ }
+
+ println!("Notice: GET requests complete quickly, POST requests have ~800ms delay.");
+
+ Ok(())
+}
+
+/// Demonstrates conditional fixed delay using `when` predicate.
+async fn conditional_fixed_delay() -> Result<(), wreq::Error> {
+ println!("=== Conditional Fixed Delay (using `DelayLayer::when`) ===\n");
+
+ // Build a client that only delays requests to specific paths
+ let client = Client::builder()
+ .layer(
+ DelayLayer::new(Duration::from_secs(1)).when(|req: &http::Request<_>| {
+ // Only apply delay to /delay/* endpoints
+ req.uri().path().starts_with("/delay")
+ }),
+ )
+ .tls_cert_verification(false)
+ .build()?;
+
+ const BASE_URL: &str = "https://httpbin.io";
+
+ println!("Requests to /delay/* will have 1s fixed delay");
+ println!("Other requests will pass through immediately\n");
+
+ // Test with different endpoints
+ let endpoints = ["/get", "/delay/0"];
+
+ for (i, endpoint) in endpoints.iter().enumerate() {
+ let url = format!("{BASE_URL}{endpoint}");
+ let start = Instant::now();
+
+ println!("Request #{}: GET {}", i + 1, url);
+ let _ = client.get(&url).send().await?;
+
+ let elapsed = start.elapsed().as_secs_f64();
+ let has_delay = endpoint.starts_with("/delay");
+
+ println!(
+ "Request #{}: completed in {:.3}s ({})\n",
+ i + 1,
+ elapsed,
+ if has_delay { "with delay" } else { "no delay" }
+ );
+ }
+
+ println!("Notice: /get completes quickly, /delay/* has additional 1s delay.");
+
+ Ok(())
+}
diff --git a/vendor/wreq-util/release-plz.toml b/vendor/wreq-util/release-plz.toml
new file mode 100644
index 00000000..395b3520
--- /dev/null
+++ b/vendor/wreq-util/release-plz.toml
@@ -0,0 +1,2 @@
+[workspace]
+publish_features = ["tokio-rt"]
\ No newline at end of file
diff --git a/vendor/wreq-util/rustfmt.toml b/vendor/wreq-util/rustfmt.toml
new file mode 100644
index 00000000..ae184a92
--- /dev/null
+++ b/vendor/wreq-util/rustfmt.toml
@@ -0,0 +1,5 @@
+group_imports = "StdExternalCrate"
+imports_granularity = "Crate"
+reorder_imports = true
+wrap_comments = true
+comment_width = 100
diff --git a/vendor/wreq-util/src/emulate.rs b/vendor/wreq-util/src/emulate.rs
new file mode 100644
index 00000000..9513ab02
--- /dev/null
+++ b/vendor/wreq-util/src/emulate.rs
@@ -0,0 +1,256 @@
+#[macro_use]
+mod macros;
+pub mod compress;
+pub mod profile;
+
+use profile::{chrome::*, firefox::*, okhttp::*, opera::*, safari::*};
+#[cfg(feature = "emulation-serde")]
+use serde::{Deserialize, Serialize};
+use typed_builder::TypedBuilder;
+
+define_enum!(
+ /// Selects which client profile the request should look like.
+ ///
+ /// This controls the built-in TLS, HTTP/2, and header presets used for the
+ /// request. Variants cover browser-style profiles as well as other clients,
+ /// such as OkHttp.
+ dispatch,
+ Profile, Chrome100,
+ Emulation,
+
+ // Chrome versions
+ Chrome100 => ("chrome_100", v100::emulation),
+ Chrome101 => ("chrome_101", v101::emulation),
+ Chrome104 => ("chrome_104", v104::emulation),
+ Chrome105 => ("chrome_105", v105::emulation),
+ Chrome106 => ("chrome_106", v106::emulation),
+ Chrome107 => ("chrome_107", v107::emulation),
+ Chrome108 => ("chrome_108", v108::emulation),
+ Chrome109 => ("chrome_109", v109::emulation),
+ Chrome110 => ("chrome_110", v110::emulation),
+ Chrome114 => ("chrome_114", v114::emulation),
+ Chrome116 => ("chrome_116", v116::emulation),
+ Chrome117 => ("chrome_117", v117::emulation),
+ Chrome118 => ("chrome_118", v118::emulation),
+ Chrome119 => ("chrome_119", v119::emulation),
+ Chrome120 => ("chrome_120", v120::emulation),
+ Chrome123 => ("chrome_123", v123::emulation),
+ Chrome124 => ("chrome_124", v124::emulation),
+ Chrome126 => ("chrome_126", v126::emulation),
+ Chrome127 => ("chrome_127", v127::emulation),
+ Chrome128 => ("chrome_128", v128::emulation),
+ Chrome129 => ("chrome_129", v129::emulation),
+ Chrome130 => ("chrome_130", v130::emulation),
+ Chrome131 => ("chrome_131", v131::emulation),
+ Chrome132 => ("chrome_132", v132::emulation),
+ Chrome133 => ("chrome_133", v133::emulation),
+ Chrome134 => ("chrome_134", v134::emulation),
+ Chrome135 => ("chrome_135", v135::emulation),
+ Chrome136 => ("chrome_136", v136::emulation),
+ Chrome137 => ("chrome_137", v137::emulation),
+ Chrome138 => ("chrome_138", v138::emulation),
+ Chrome139 => ("chrome_139", v139::emulation),
+ Chrome140 => ("chrome_140", v140::emulation),
+ Chrome141 => ("chrome_141", v141::emulation),
+ Chrome142 => ("chrome_142", v142::emulation),
+ Chrome143 => ("chrome_143", v143::emulation),
+ Chrome144 => ("chrome_144", v144::emulation),
+ Chrome145 => ("chrome_145", v145::emulation),
+ Chrome146 => ("chrome_146", v146::emulation),
+ Chrome147 => ("chrome_147", v147::emulation),
+ Chrome148 => ("chrome_148", v148::emulation),
+
+ // Edge versions
+ Edge101 => ("edge_101", edge101::emulation),
+ Edge122 => ("edge_122", edge122::emulation),
+ Edge127 => ("edge_127", edge127::emulation),
+ Edge131 => ("edge_131", edge131::emulation),
+ Edge134 => ("edge_134", edge134::emulation),
+ Edge135 => ("edge_135", edge135::emulation),
+ Edge136 => ("edge_136", edge136::emulation),
+ Edge137 => ("edge_137", edge137::emulation),
+ Edge138 => ("edge_138", edge138::emulation),
+ Edge139 => ("edge_139", edge139::emulation),
+ Edge140 => ("edge_140", edge140::emulation),
+ Edge141 => ("edge_141", edge141::emulation),
+ Edge142 => ("edge_142", edge142::emulation),
+ Edge143 => ("edge_143", edge143::emulation),
+ Edge144 => ("edge_144", edge144::emulation),
+ Edge145 => ("edge_145", edge145::emulation),
+ Edge146 => ("edge_146", edge146::emulation),
+ Edge147 => ("edge_147", edge147::emulation),
+ Edge148 => ("edge_148", edge148::emulation),
+
+ // Opera versions
+ Opera116 => ("opera_116", opera116::emulation),
+ Opera117 => ("opera_117", opera117::emulation),
+ Opera118 => ("opera_118", opera118::emulation),
+ Opera119 => ("opera_119", opera119::emulation),
+ Opera120 => ("opera_120", opera120::emulation),
+ Opera121 => ("opera_121", opera121::emulation),
+ Opera122 => ("opera_122", opera122::emulation),
+ Opera123 => ("opera_123", opera123::emulation),
+ Opera124 => ("opera_124", opera124::emulation),
+ Opera125 => ("opera_125", opera125::emulation),
+ Opera126 => ("opera_126", opera126::emulation),
+ Opera127 => ("opera_127", opera127::emulation),
+ Opera128 => ("opera_128", opera128::emulation),
+ Opera129 => ("opera_129", opera129::emulation),
+ Opera130 => ("opera_130", opera130::emulation),
+ Opera131 => ("opera_131", opera131::emulation),
+
+ // Firefox versions
+ Firefox109 => ("firefox_109", ff109::emulation),
+ Firefox117 => ("firefox_117", ff117::emulation),
+ Firefox128 => ("firefox_128", ff128::emulation),
+ Firefox133 => ("firefox_133", ff133::emulation),
+ Firefox135 => ("firefox_135", ff135::emulation),
+ FirefoxPrivate135 => ("firefox_private_135", ff_private_135::emulation),
+ FirefoxAndroid135 => ("firefox_android_135", ff_android_135::emulation),
+ Firefox136 => ("firefox_136", ff136::emulation),
+ FirefoxPrivate136 => ("firefox_private_136", ff_private_136::emulation),
+ Firefox139 => ("firefox_139", ff139::emulation),
+ Firefox142 => ("firefox_142", ff142::emulation),
+ Firefox143 => ("firefox_143", ff143::emulation),
+ Firefox144 => ("firefox_144", ff144::emulation),
+ Firefox145 => ("firefox_145", ff145::emulation),
+ Firefox146 => ("firefox_146", ff146::emulation),
+ Firefox147 => ("firefox_147", ff147::emulation),
+ Firefox148 => ("firefox_148", ff148::emulation),
+ Firefox149 => ("firefox_149", ff149::emulation),
+ Firefox150 => ("firefox_150", ff150::emulation),
+ Firefox151 => ("firefox_151", ff151::emulation),
+
+ // Safari versions
+ SafariIos17_2 => ("safari_ios_17.2", safari_ios_17_2::emulation),
+ SafariIos17_4_1 => ("safari_ios_17.4.1", safari_ios_17_4_1::emulation),
+ SafariIos16_5 => ("safari_ios_16.5", safari_ios_16_5::emulation),
+ Safari15_3 => ("safari_15.3", safari15_3::emulation),
+ Safari15_5 => ("safari_15.5", safari15_5::emulation),
+ Safari15_6_1 => ("safari_15.6.1", safari15_6_1::emulation),
+ Safari16 => ("safari_16", safari16::emulation),
+ Safari16_5 => ("safari_16.5", safari16_5::emulation),
+ Safari17_0 => ("safari_17.0", safari17_0::emulation),
+ Safari17_2_1 => ("safari_17.2.1", safari17_2_1::emulation),
+ Safari17_4_1 => ("safari_17.4.1", safari17_4_1::emulation),
+ Safari17_5 => ("safari_17.5", safari17_5::emulation),
+ Safari17_6 => ("safari_17.6", safari17_6::emulation),
+ Safari18 => ("safari_18", safari18::emulation),
+ SafariIPad18 => ("safari_ipad_18", safari_ipad_18::emulation),
+ Safari18_2 => ("safari_18.2", safari18_2::emulation),
+ SafariIos18_1_1 => ("safari_ios_18.1.1", safari_ios_18_1_1::emulation),
+ Safari18_3 => ("safari_18.3", safari18_3::emulation),
+ Safari18_3_1 => ("safari_18.3.1", safari18_3_1::emulation),
+ Safari18_5 => ("safari_18.5", safari18_5::emulation),
+ Safari26 => ("safari_26", safari26::emulation),
+ Safari26_1 => ("safari_26.1", safari26_1::emulation),
+ Safari26_2 => ("safari_26.2", safari26_2::emulation),
+ Safari26_3 => ("safari_26.3", safari26_3::emulation),
+ Safari26_4 => ("safari_26.4", safari26_4::emulation),
+ SafariIPad26 => ("safari_ipad_26", safari_ipad_26::emulation),
+ SafariIpad26_2 => ("safari_ipad_26.2", safari_ipad_26_2::emulation),
+ SafariIos26 => ("safari_ios_26", safari_ios_26::emulation),
+ SafariIos26_2 => ("safari_ios_26.2", safari_ios_26_2::emulation),
+
+ // OkHttp versions
+ OkHttp3_9 => ("okhttp_3.9", okhttp3_9::emulation),
+ OkHttp3_11 => ("okhttp_3.11", okhttp3_11::emulation),
+ OkHttp3_13 => ("okhttp_3.13", okhttp3_13::emulation),
+ OkHttp3_14 => ("okhttp_3.14", okhttp3_14::emulation),
+ OkHttp4_9 => ("okhttp_4.9", okhttp4_9::emulation),
+ OkHttp4_10 => ("okhttp_4.10", okhttp4_10::emulation),
+ OkHttp4_12 => ("okhttp_4.12", okhttp4_12::emulation),
+ OkHttp5 => ("okhttp_5", okhttp5::emulation)
+
+);
+
+impl wreq::IntoEmulation for Profile {
+ #[inline]
+ fn into_emulation(self) -> wreq::Emulation {
+ Emulation::builder().profile(self).build().into_emulation()
+ }
+}
+
+define_enum!(
+ /// Selects which platform the client should look like.
+ ///
+ /// This mainly affects platform-specific headers and user-agent details.
+ /// In most cases you can keep the default unless you need to match a
+ /// specific Windows, macOS, Linux, Android, or iOS profile.
+ plain,
+ Platform, MacOS,
+ Windows => "windows",
+ MacOS => "macos",
+ Linux => "linux",
+ Android => "android",
+ IOS => "ios"
+);
+
+impl Platform {
+ #[inline]
+ const fn platform(&self) -> &'static str {
+ match self {
+ Platform::MacOS => "\"macOS\"",
+ Platform::Linux => "\"Linux\"",
+ Platform::Windows => "\"Windows\"",
+ Platform::Android => "\"Android\"",
+ Platform::IOS => "\"iOS\"",
+ }
+ }
+
+ #[inline]
+ const fn is_mobile(&self) -> bool {
+ matches!(self, Platform::Android | Platform::IOS)
+ }
+}
+
+/// Represents the configuration options for emulating a client profile and platform.
+///
+/// The `Emulation` struct allows you to configure various aspects of profile and platform
+/// emulation, including the profile, platform, and whether to enable certain features
+/// like HTTP/2 or headers.
+#[derive(Default, Clone, TypedBuilder)]
+pub struct Emulation {
+ /// Whether to change the profile (browser/okhttp) information.
+ #[builder(default)]
+ profile: Profile,
+
+ /// Whether to change the platform (Windows/macOS/Linux/Android/iOS) information.
+ #[builder(default)]
+ platform: Platform,
+
+ /// Whether to enable HTTP/2.
+ #[builder(default = true)]
+ http2: bool,
+
+ /// Whether to include default headers.
+ #[builder(default = true)]
+ headers: bool,
+}
+
+impl Emulation {
+ /// Returns a random variant of the `Profile` enum.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use wreq_util::Emulation;
+ ///
+ /// let random_emulation = Emulation::random();
+ /// println!("{:?}", random_emulation);
+ /// ```
+ pub fn random() -> Emulation {
+ let rand = crate::rand::fast_random();
+ Emulation::builder()
+ .profile(Profile::VARIANTS[(rand as usize) % Profile::VARIANTS.len()])
+ .platform(Platform::VARIANTS[((rand >> 32) as usize) % Platform::VARIANTS.len()])
+ .build()
+ }
+}
+
+impl wreq::IntoEmulation for Emulation {
+ #[inline]
+ fn into_emulation(self) -> wreq::Emulation {
+ self.profile.match_emulation(self)
+ }
+}
diff --git a/vendor/wreq-util/src/emulate/compress.rs b/vendor/wreq-util/src/emulate/compress.rs
new file mode 100644
index 00000000..c3373c30
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/compress.rs
@@ -0,0 +1,85 @@
+//! Compression algorithms for TLS 1.3 certificate compression.
+
+use brotli::{CompressorWriter as BrotliEncoder, Decompressor as BrotliDecoder};
+use flate2::{Compression, read::ZlibDecoder, write::ZlibEncoder};
+use std::io::{self, Write};
+use wreq::tls::compress::{CertificateCompressionAlgorithm, CertificateCompressor, Codec};
+use zstd::stream::{Decoder as ZstdDecoder, Encoder as ZstdEncoder};
+
+#[derive(Debug)]
+pub struct BrotliCompressor;
+
+#[derive(Debug)]
+pub struct ZlibCompressor;
+
+#[derive(Debug)]
+pub struct ZstdCompressor;
+
+impl CertificateCompressor for BrotliCompressor {
+ fn compress(&self) -> Codec {
+ Codec::Pointer(|input, output| {
+ let mut writer = BrotliEncoder::new(output, input.len(), 11, 32);
+ writer.write_all(input)?;
+ writer.flush()?;
+ Ok(())
+ })
+ }
+
+ fn decompress(&self) -> Codec {
+ Codec::Pointer(|input, output| {
+ let mut reader = BrotliDecoder::new(input, 4096);
+ io::copy(&mut reader, output)?;
+ Ok(())
+ })
+ }
+
+ fn algorithm(&self) -> CertificateCompressionAlgorithm {
+ CertificateCompressionAlgorithm::BROTLI
+ }
+}
+
+impl CertificateCompressor for ZlibCompressor {
+ fn compress(&self) -> Codec {
+ Codec::Pointer(|input, output| {
+ let mut encoder = ZlibEncoder::new(output, Compression::default());
+ encoder.write_all(input)?;
+ encoder.finish()?;
+ Ok(())
+ })
+ }
+
+ fn decompress(&self) -> Codec {
+ Codec::Pointer(|input, output| {
+ let mut reader = ZlibDecoder::new(input);
+ io::copy(&mut reader, output)?;
+ Ok(())
+ })
+ }
+
+ fn algorithm(&self) -> CertificateCompressionAlgorithm {
+ CertificateCompressionAlgorithm::ZLIB
+ }
+}
+
+impl CertificateCompressor for ZstdCompressor {
+ fn compress(&self) -> Codec {
+ Codec::Pointer(|input, output| {
+ let mut encoder = ZstdEncoder::new(output, 0)?;
+ encoder.write_all(input)?;
+ encoder.finish()?;
+ Ok(())
+ })
+ }
+
+ fn decompress(&self) -> Codec {
+ Codec::Pointer(|input, output| {
+ let mut reader = ZstdDecoder::new(input)?;
+ io::copy(&mut reader, output)?;
+ Ok(())
+ })
+ }
+
+ fn algorithm(&self) -> CertificateCompressionAlgorithm {
+ CertificateCompressionAlgorithm::ZSTD
+ }
+}
diff --git a/vendor/wreq-util/src/emulate/macros.rs b/vendor/wreq-util/src/emulate/macros.rs
new file mode 100644
index 00000000..e763c89b
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/macros.rs
@@ -0,0 +1,370 @@
+macro_rules! define_enum {
+ (
+ $(#[$meta:meta])*
+ dispatch,
+ $name:ident, $default_variant:ident,
+ $const_target:ident,
+ $(
+ $variant:ident => ($rename:expr, $emulation_fn:path)
+ ),* $(,)?
+ ) => {
+ $(#[$meta])*
+ #[non_exhaustive]
+ #[derive(Clone, Copy, Hash, Debug, PartialEq, Eq)]
+ #[cfg_attr(feature = "emulation-serde", derive(Deserialize, Serialize))]
+ pub enum $name {
+ $(
+ #[cfg_attr(feature = "emulation-serde", serde(rename = $rename))]
+ $variant,
+ )*
+ }
+
+ impl $name {
+ pub const VARIANTS: &[$name] = &[
+ $(
+ $name::$variant,
+ )*
+ ];
+
+ pub fn match_emulation(self, opt: $const_target) -> wreq::Emulation {
+ match self {
+ $(
+ $name::$variant => $emulation_fn(opt),
+ )*
+ }
+ }
+ }
+
+ impl Default for $name {
+ fn default() -> Self {
+ $name::$default_variant
+ }
+ }
+
+ #[allow(non_upper_case_globals)]
+ impl $const_target {
+ $(
+ pub const $variant: $name = $name::$variant;
+ )*
+ }
+ };
+
+ (
+ $(#[$meta:meta])*
+ plain,
+ $name:ident, $default_variant:ident,
+ $(
+ $variant:ident => $rename:expr
+ ),* $(,)?
+ ) => {
+ $(#[$meta])*
+ #[non_exhaustive]
+ #[derive(Clone, Copy, Hash, Debug, PartialEq, Eq)]
+ #[cfg_attr(feature = "emulation-serde", derive(Deserialize, Serialize))]
+ pub enum $name {
+ $(
+ #[cfg_attr(feature = "emulation-serde", serde(rename = $rename))]
+ $variant,
+ )*
+ }
+
+ impl $name {
+ pub const VARIANTS: &[$name] = &[
+ $(
+ $name::$variant,
+ )*
+ ];
+ }
+
+ impl Default for $name {
+ fn default() -> Self {
+ $name::$default_variant
+ }
+ }
+ };
+}
+
+macro_rules! header_chrome_sec_ch_ua {
+ ($headers:expr, $ua:expr, $platform:expr, $is_mobile:expr) => {
+ let mobile = if $is_mobile { "?1" } else { "?0" };
+ $headers.insert("sec-ch-ua", HeaderValue::from_static($ua));
+ $headers.insert("sec-ch-ua-mobile", HeaderValue::from_static(mobile));
+ $headers.insert("sec-ch-ua-platform", HeaderValue::from_static($platform));
+ };
+}
+
+macro_rules! header_chrome_sec_fetch {
+ ($headers:expr) => {
+ $headers.insert("sec-fetch-dest", HeaderValue::from_static("document"));
+ $headers.insert("sec-fetch-mode", HeaderValue::from_static("navigate"));
+ $headers.insert("sec-fetch-site", HeaderValue::from_static("none"));
+ };
+}
+
+macro_rules! header_chrome_ua {
+ ($headers:expr, $ua:expr) => {
+ $headers.insert(USER_AGENT, HeaderValue::from_static($ua));
+ };
+}
+
+macro_rules! header_chrome_accept {
+ ($headers:expr) => {
+ $headers.insert(ACCEPT, HeaderValue::from_static("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"));
+ #[cfg(feature = "emulation-compression")]
+ $headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br"),
+ );
+ $headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ };
+ (zstd, $headers:expr) => {
+ $headers.insert(ACCEPT, HeaderValue::from_static("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"));
+ #[cfg(feature = "emulation-compression")]
+ $headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br, zstd"),
+ );
+ $headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ }
+}
+
+macro_rules! header_firefox_sec_fetch {
+ ($headers:expr) => {
+ $headers.insert("sec-fetch-dest", HeaderValue::from_static("document"));
+ $headers.insert("sec-fetch-mode", HeaderValue::from_static("navigate"));
+ $headers.insert("sec-fetch-site", HeaderValue::from_static("none"));
+ };
+}
+
+macro_rules! header_firefox_accept {
+ ($headers:expr) => {
+ $headers.insert(
+ ACCEPT,
+ HeaderValue::from_static(
+ "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ ),
+ );
+ #[cfg(feature = "emulation-compression")]
+ $headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br"),
+ );
+ $headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.5"));
+ };
+ (zstd, $headers:expr) => {
+ $headers.insert(
+ ACCEPT,
+ HeaderValue::from_static(
+ "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ ),
+ );
+ #[cfg(feature = "emulation-compression")]
+ $headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br, zstd"),
+ );
+ $headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.5"));
+ };
+}
+
+macro_rules! header_firefox_ua {
+ ($headers:expr, $ua:expr) => {
+ $headers.insert(
+ HeaderName::from_static("te"),
+ HeaderValue::from_static("trailers"),
+ );
+ $headers.insert(USER_AGENT, HeaderValue::from_static($ua));
+ };
+}
+
+macro_rules! join {
+ ($sep:expr, $first:expr $(, $rest:expr)*) => {
+ concat!($first $(, $sep, $rest)*)
+ };
+}
+
+macro_rules! standard_mod_generator {
+ ($mod_name:ident, $tls_options:expr, $http2_options:expr, $headers:expr) => {
+ pub(crate) mod $mod_name {
+ use super::*;
+
+ #[inline]
+ pub fn emulation(emulation: Emulation) -> wreq::Emulation {
+ build_emulation(emulation.http2, ($headers)(&emulation))
+ }
+
+ pub fn build_emulation(
+ http2: bool,
+ default_headers: Option<HeaderMap>,
+ ) -> wreq::Emulation {
+ build_standard_emulation(
+ stringify!($mod_name),
+ $tls_options,
+ http2.then(|| $http2_options),
+ default_headers,
+ )
+ }
+ }
+ };
+ ($mod_name:ident, $build_emulation:expr, $headers:expr) => {
+ pub(crate) mod $mod_name {
+ use super::*;
+
+ #[inline]
+ pub fn emulation(emulation: Emulation) -> wreq::Emulation {
+ $build_emulation(emulation.http2, ($headers)(&emulation))
+ }
+ }
+ };
+}
+
+macro_rules! fixed_headers {
+ ($emulation:expr, $header_initializer:ident, $ua:expr) => {
+ $emulation.headers.then(|| $header_initializer($ua))
+ };
+}
+
+macro_rules! platform_headers {
+ (
+ $emulation:expr,
+ $header_initializer:ident,
+ [($default_os:ident, $default_sec_ch_ua:tt, $default_ua:tt) $(, ($other_os:ident, $other_sec_ch_ua:tt, $other_ua:tt))*]
+ ) => {{
+ #[allow(unreachable_patterns)]
+ $emulation.headers.then(|| {
+ match $emulation.platform {
+ $(
+ Platform::$other_os => $header_initializer(
+ $other_sec_ch_ua,
+ $other_ua,
+ $emulation.platform,
+ ),
+ )*
+ _ => $header_initializer(
+ $default_sec_ch_ua,
+ $default_ua,
+ Platform::$default_os,
+ ),
+ }
+ })
+ }};
+}
+
+macro_rules! firefox_platform_headers {
+ ($emulation:expr, $header_initializer:ident, [($default_os:ident, $default_ua:tt) $(, ($other_os:ident, $other_ua:tt))*]) => {{
+ #[allow(unreachable_patterns)]
+ $emulation.headers.then(|| {
+ match $emulation.platform {
+ $(
+ Platform::$other_os => $header_initializer($other_ua),
+ )*
+ _ => $header_initializer($default_ua),
+ }
+ })
+ }};
+}
+
+macro_rules! mod_generator {
+ (
+ $mod_name:ident,
+ $tls_options:expr,
+ $http2_options:expr,
+ $header_initializer:ident,
+ [($default_os:ident, $default_sec_ch_ua:tt, $default_ua:tt) $(, ($other_os:ident, $other_sec_ch_ua:tt, $other_ua:tt))*]
+ ) => {
+ standard_mod_generator!(
+ $mod_name,
+ $tls_options,
+ $http2_options,
+ |emulation: &Emulation| {
+ platform_headers!(
+ emulation,
+ $header_initializer,
+ [($default_os, $default_sec_ch_ua, $default_ua) $(, ($other_os, $other_sec_ch_ua, $other_ua))*]
+ )
+ }
+ );
+ };
+ (
+ $mod_name:ident,
+ $tls_options:expr,
+ $http2_options:expr,
+ $header_initializer:ident,
+ [($default_os:ident, $default_ua:tt) $(, ($other_os:ident, $other_ua:tt))*]
+ ) => {
+ standard_mod_generator!(
+ $mod_name,
+ $tls_options,
+ $http2_options,
+ |emulation: &Emulation| {
+ firefox_platform_headers!(
+ emulation,
+ $header_initializer,
+ [($default_os, $default_ua) $(, ($other_os, $other_ua))*]
+ )
+ }
+ );
+ };
+ (
+ $mod_name:ident,
+ $tls_options:expr,
+ $http2_options:expr,
+ $header_initializer:ident,
+ $ua:expr
+ ) => {
+ standard_mod_generator!(
+ $mod_name,
+ $tls_options,
+ $http2_options,
+ |emulation: &Emulation| fixed_headers!(emulation, $header_initializer, $ua)
+ );
+ };
+ (
+ $mod_name:ident,
+ $build_emulation:expr,
+ $header_initializer:ident,
+ [($default_os:ident, $default_sec_ch_ua:tt, $default_ua:tt) $(, ($other_os:ident, $other_sec_ch_ua:tt, $other_ua:tt))*]
+ ) => {
+ standard_mod_generator!(
+ $mod_name,
+ $build_emulation,
+ |emulation: &Emulation| {
+ platform_headers!(
+ emulation,
+ $header_initializer,
+ [($default_os, $default_sec_ch_ua, $default_ua) $(, ($other_os, $other_sec_ch_ua, $other_ua))*]
+ )
+ }
+ );
+ };
+ (
+ $mod_name:ident,
+ $build_emulation:expr,
+ $header_initializer:ident,
+ [($default_os:ident, $default_ua:tt) $(, ($other_os:ident, $other_ua:tt))*]
+ ) => {
+ standard_mod_generator!(
+ $mod_name,
+ $build_emulation,
+ |emulation: &Emulation| {
+ firefox_platform_headers!(
+ emulation,
+ $header_initializer,
+ [($default_os, $default_ua) $(, ($other_os, $other_ua))*]
+ )
+ }
+ );
+ };
+ (
+ $mod_name:ident,
+ $build_emulation:expr,
+ $header_initializer:ident,
+ $ua:expr
+ ) => {
+ standard_mod_generator!(
+ $mod_name,
+ $build_emulation,
+ |emulation: &Emulation| fixed_headers!(emulation, $header_initializer, $ua)
+ );
+ };
+}
diff --git a/vendor/wreq-util/src/emulate/profile.rs b/vendor/wreq-util/src/emulate/profile.rs
new file mode 100644
index 00000000..11a98cc5
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile.rs
@@ -0,0 +1,47 @@
+//! Emulation for different browsers.
+
+pub mod chrome;
+pub mod firefox;
+pub mod okhttp;
+pub mod opera;
+pub mod safari;
+
+use typed_builder::TypedBuilder;
+#[cfg(feature = "emulation-compression")]
+use wreq::header::ACCEPT_ENCODING;
+use wreq::{
+ Group,
+ header::{ACCEPT, ACCEPT_LANGUAGE, HeaderMap, HeaderName, HeaderValue, USER_AGENT},
+ http2::{
+ Http2Options, Priorities, Priority, PseudoId, PseudoOrder, SettingId, SettingsOrder,
+ StreamDependency, StreamId,
+ },
+ tls::{
+ AlpnProtocol, AlpsProtocol, ExtensionType, KeyShare, TlsOptions, TlsVersion,
+ compress::CertificateCompressor,
+ },
+};
+
+use super::{
+ Emulation, Platform,
+ compress::{BrotliCompressor, ZlibCompressor, ZstdCompressor},
+};
+
+fn build_standard_emulation(
+ group: &'static str,
+ tls_options: TlsOptions,
+ http2_options: Option<Http2Options>,
+ default_headers: Option<HeaderMap>,
+) -> wreq::Emulation {
+ let mut builder = wreq::Emulation::builder().tls_options(tls_options);
+
+ if let Some(http2_options) = http2_options {
+ builder = builder.http2_options(http2_options);
+ }
+
+ if let Some(headers) = default_headers {
+ builder = builder.headers(headers);
+ }
+
+ builder.build(Group::new(group))
+}
diff --git a/vendor/wreq-util/src/emulate/profile/chrome.rs b/vendor/wreq-util/src/emulate/profile/chrome.rs
new file mode 100644
index 00000000..99beda7d
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/chrome.rs
@@ -0,0 +1,1961 @@
+#[macro_use]
+mod http2;
+#[macro_use]
+mod tls;
+mod header;
+
+use header::*;
+use tls::*;
+
+use super::*;
+
+mod_generator!(
+ v100,
+ tls_options!(1),
+ http2_options!(1),
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 15_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.85 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v101,
+ v100::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101""#,
+ "Mozilla/5.0 (X11; U; Windows x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/101.0.4951.58 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge101,
+ v100::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.47"
+ ),
+ (
+ Android,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101""#,
+ "Mozilla/5.0 (Linux; Android 10; ONEPLUS A6003) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.31"
+ ),
+ (
+ Windows,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53"
+ ),
+ // This shouldn't exist, edge was never meant to be on linux,
+ // but I found some UAs in myip.ms (same for 122, 127 and 131)
+ (
+ Linux,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53"
+ ),
+ (
+ IOS,
+ r#""Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/101.0.4951.64 Mobile Safari/537.36 Edg/101.0.1210.53"
+ )
+ ]
+);
+
+mod_generator!(
+ v104,
+ v100::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104""#,
+ "Mozilla/5.0 (X11; U; Windows x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/104.0.5112.99 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v105,
+ tls_options!(2),
+ http2_options!(1),
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105""#,
+ "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105""#,
+ "Mozilla/5.0 (X11; U; Windows x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/105.0.5195.100 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v106,
+ tls_options!(3),
+ http2_options!(2),
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/106.0.5249.92 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v107,
+ v106::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/107.0.5304.66 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v108,
+ v106::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/108.0.5359.112 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v109,
+ v106::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/109.0.5414.112 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v110,
+ v100::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/110.0.5481.104 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v114,
+ v106::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
+ )
+ ]
+);
+
+mod_generator!(
+ v116,
+ tls_options!(4),
+ http2_options!(2),
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/116.0.5845.103 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v117,
+ tls_options!(5),
+ http2_options!(3),
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117""#,
+ "Mozilla/5.0 (iPad; CPU OS 16_0 like Mac OS X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
+ )
+ ]
+);
+
+mod_generator!(
+ v120,
+ v117::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120""#,
+ "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"
+ ),
+ (
+ Linux,
+ r#""Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/120.0.6099.119 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge122,
+ v117::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="122", "Not(A:Brand";v="24", "Microsoft Edge";v="122""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="122", "Not(A:Brand";v="24", "Microsoft Edge";v="122""#,
+ "Mozilla/5.0 (Linux; Android 10; Pixel 3 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6268.219 Safari/537.36 Edg/122.0.2238.82"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="122", "Not(A:Brand";v="24", "Microsoft Edge";v="122""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0"
+ ),
+ // This shouldn't exist, edge was never meant to be on linux
+ (
+ Linux,
+ r#""Chromium";v="122", "Not(A:Brand";v="24", "Microsoft Edge";v="122""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="122", "Not(A:Brand";v="24", "Microsoft Edge";v="122""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ v123,
+ v117::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123""#,
+ "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"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
+ )
+ ]
+);
+
+mod_generator!(
+ v118,
+ tls_options!(4),
+ http2_options!(3),
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/118.0.5993.92 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v119,
+ v118::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/119.0.6045.109 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v124,
+ tls_options!(6, CURVES_2),
+ http2_options!(3),
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99""#,
+ "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"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6312.52 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v126,
+ v124::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ r#""Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/126.0.6478.153 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v127,
+ v124::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ r#""Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/127.0.6533.77 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge127,
+ v124::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not)A;Brand";v="99", "Microsoft Edge";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0"
+ ),
+ (
+ Android,
+ r#""Not)A;Brand";v="99", "Microsoft Edge";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6332.205 Safari/537.36 Edg/127.0.2322.67"
+ ),
+ (
+ Windows,
+ r#""Not)A;Brand";v="99", "Microsoft Edge";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0"
+ ),
+ // This shouldn't exist, edge was never meant to be on linux
+ (
+ Linux,
+ r#""Not)A;Brand";v="99", "Microsoft Edge";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Not)A;Brand";v="99", "Microsoft Edge";v="127", "Chromium";v="127""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ v128,
+ v124::build_emulation,
+ header_initializer,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/128.0.6613.98 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v129,
+ v124::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/129.0.6668.46 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v130,
+ v124::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99""#,
+ "Mozilla/5.0 (iPad; CPU OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/130.0.6723.90 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v131,
+ tls_options!(6, CURVES_3),
+ http2_options!(3),
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Linux: Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/131.0.6778.134 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge131,
+ v131::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
+ ),
+ (
+ Android,
+ r#""Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Linux; Android 10; HD1913) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.6778.200 Mobile Safari/537.36 EdgA/131.0.2903.87"
+ ),
+ (
+ Windows,
+ r#""Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
+ ),
+ // This shouldn't exist, edge was never meant to be on linux
+ (
+ Linux,
+ r#""Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ v132,
+ tls_options!(7, CURVES_3),
+ http2_options!(3),
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Google Chrome";v="132""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Google Chrome";v="132""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Google Chrome";v="132""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Google Chrome";v="132""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Google Chrome";v="132""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/132.0.6834.78 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v133,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/133.0.6943.33 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v134,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/134.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge134,
+ v131::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Microsoft Edge";v="134"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Microsoft Edge";v="134"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Microsoft Edge";v="134"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Microsoft Edge";v="134"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Microsoft Edge";v="134"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/134.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge135,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Microsoft Edge";v="135"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Microsoft Edge";v="135"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Microsoft Edge";v="135"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Microsoft Edge";v="135"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Microsoft Edge";v="135"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/135.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge136,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="136", "Not:A-Brand";v="24", "Microsoft Edge";v="136"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="136", "Not:A-Brand";v="24", "Microsoft Edge";v="136"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="136", "Not:A-Brand";v="24", "Microsoft Edge";v="136"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="136", "Not:A-Brand";v="24", "Microsoft Edge";v="136"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="136", "Not:A-Brand";v="24", "Microsoft Edge";v="136"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/136.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge137,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="137", "Not:A-Brand";v="24", "Microsoft Edge";v="137"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="137", "Not:A-Brand";v="24", "Microsoft Edge";v="137"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="137", "Not:A-Brand";v="24", "Microsoft Edge";v="137"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="137", "Not:A-Brand";v="24", "Microsoft Edge";v="137"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="137", "Not:A-Brand";v="24", "Microsoft Edge";v="137"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/137.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge138,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Microsoft Edge";v="138"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Microsoft Edge";v="138"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Microsoft Edge";v="138"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Microsoft Edge";v="138"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Microsoft Edge";v="138"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/138.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge139,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Microsoft Edge";v="139"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Microsoft Edge";v="139"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Microsoft Edge";v="139"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Microsoft Edge";v="139"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Microsoft Edge";v="139"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/139.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge140,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Microsoft Edge";v="140"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Microsoft Edge";v="140"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Microsoft Edge";v="140"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Microsoft Edge";v="140"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Microsoft Edge";v="140"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/140.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge141,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="141", "Not=A?Brand";v="24", "Microsoft Edge";v="141"#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="141", "Not=A?Brand";v="24", "Microsoft Edge";v="141"#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="141", "Not=A?Brand";v="24", "Microsoft Edge";v="141"#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="141", "Not=A?Brand";v="24", "Microsoft Edge";v="141"#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="141", "Not=A?Brand";v="24", "Microsoft Edge";v="141"#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/141.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ v135,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="135", "Not-A.Brand";v="8", "Chromium";v="135""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="135", "Not-A.Brand";v="8", "Chromium";v="135""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="135", "Not-A.Brand";v="8", "Chromium";v="135""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="135", "Not-A.Brand";v="8", "Chromium";v="135""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="135", "Not-A.Brand";v="8", "Chromium";v="135""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/135.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v136,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/136.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v137,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/137.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v138,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not)A;Brand";v="8", "Chromium";v="138", "Google Chrome";v="138""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/138.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v139,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not;A=Brand";v="99", "Google Chrome";v="139", "Chromium";v="139""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not;A=Brand";v="99", "Google Chrome";v="139", "Chromium";v="139""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not;A=Brand";v="99", "Google Chrome";v="139", "Chromium";v="139""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not;A=Brand";v="99", "Google Chrome";v="139", "Chromium";v="139""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not;A=Brand";v="99", "Google Chrome";v="139", "Chromium";v="139""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/139.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v140,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/140.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v141,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/141.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v142,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/142.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge142,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="142", "Microsoft Edge";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="142", "Microsoft Edge";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Mobile Safari/537.36 Edg/142.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="142", "Microsoft Edge";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="142", "Microsoft Edge";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="142", "Microsoft Edge";v="142", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ v143,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/143.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v144,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Google Chrome";v="144""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Google Chrome";v="144""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Google Chrome";v="144""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Google Chrome";v="144""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Google Chrome";v="144""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/144.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v145,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not:A-Brand";v="99", "Google Chrome";v="145", "Chromium";v="145""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Not:A-Brand";v="99", "Google Chrome";v="145", "Chromium";v="145""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Not:A-Brand";v="99", "Google Chrome";v="145", "Chromium";v="145""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Not:A-Brand";v="99", "Google Chrome";v="145", "Chromium";v="145""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Not:A-Brand";v="99", "Google Chrome";v="145", "Chromium";v="145""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/145.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v146,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.7680.164 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/146.0.7680.164 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v147,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Google Chrome";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Google Chrome";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Google Chrome";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.7712.122 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Google Chrome";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Google Chrome";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/147.0.7712.122 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ v148,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36"
+ ),
+ (
+ Android,
+ r#""Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Mobile Safari/537.36"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/148.0.0.0 Mobile/15E148 Safari/604.1"
+ )
+ ]
+);
+
+mod_generator!(
+ edge143,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="143", "Microsoft Edge";v="143", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="143", "Microsoft Edge";v="143", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36 Edg/143.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="143", "Microsoft Edge";v="143", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="143", "Microsoft Edge";v="143", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="143", "Microsoft Edge";v="143", "Not_A Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge144,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Microsoft Edge";v="144""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0"
+ ),
+ (
+ Android,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Microsoft Edge";v="144""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Mobile Safari/537.36 Edg/144.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Microsoft Edge";v="144""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Microsoft Edge";v="144""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Not(A:Brand";v="8", "Chromium";v="144", "Microsoft Edge";v="144""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge145,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="145", "Not;A=Brand";v="24", "Microsoft Edge";v="145""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="145", "Not;A=Brand";v="24", "Microsoft Edge";v="145""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36 Edg/145.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="145", "Not;A=Brand";v="24", "Microsoft Edge";v="145""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="145", "Not;A=Brand";v="24", "Microsoft Edge";v="145""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="145", "Not;A=Brand";v="24", "Microsoft Edge";v="145""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ edge146,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="146", "Not(A:Brand";v="24", "Microsoft Edge";v="146""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.3856.109"
+ ),
+ (
+ Android,
+ r#""Chromium";v="146", "Not(A:Brand";v="24", "Microsoft Edge";v="146""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.7680.178 Mobile Safari/537.36 EdgA/146.0.3856.97"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="146", "Not(A:Brand";v="24", "Microsoft Edge";v="146""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.3856.109"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="146", "Not(A:Brand";v="24", "Microsoft Edge";v="146""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.3856.109"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="146", "Not(A:Brand";v="24", "Microsoft Edge";v="146""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 EdgiOS/146.0.3856.102 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ edge147,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Microsoft Edge";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.3912.51"
+ ),
+ (
+ Android,
+ r#""Microsoft Edge";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.7727.55 Mobile Safari/537.36 EdgA/147.0.3912.51"
+ ),
+ (
+ Windows,
+ r#""Microsoft Edge";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.3912.51"
+ ),
+ (
+ Linux,
+ r#""Microsoft Edge";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.3912.51"
+ ),
+ (
+ IOS,
+ r#""Microsoft Edge";v="147", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 EdgiOS/147.0.3912.51 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ edge148,
+ v132::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="148", "Microsoft Edge";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0"
+ ),
+ (
+ Android,
+ r#""Chromium";v="148", "Microsoft Edge";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Mobile Safari/537.36 EdgA/148.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="148", "Microsoft Edge";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0"
+ ),
+ (
+ Linux,
+ r#""Chromium";v="148", "Microsoft Edge";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0"
+ ),
+ (
+ IOS,
+ r#""Chromium";v="148", "Microsoft Edge";v="148", "Not/A)Brand";v="99""#,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 EdgiOS/148.0.0.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
diff --git a/vendor/wreq-util/src/emulate/profile/chrome/header.rs b/vendor/wreq-util/src/emulate/profile/chrome/header.rs
new file mode 100644
index 00000000..980b90af
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/chrome/header.rs
@@ -0,0 +1,59 @@
+use super::*;
+
+pub fn header_initializer(
+ sec_ch_ua: &'static str,
+ ua: &'static str,
+ emulation_os: Platform,
+) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ header_chrome_sec_ch_ua!(
+ headers,
+ sec_ch_ua,
+ emulation_os.platform(),
+ emulation_os.is_mobile()
+ );
+ header_chrome_ua!(headers, ua);
+ header_chrome_sec_fetch!(headers);
+ header_chrome_accept!(headers);
+ headers
+}
+
+pub fn header_initializer_with_zstd(
+ sec_ch_ua: &'static str,
+ ua: &'static str,
+ emulation_os: Platform,
+) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ header_chrome_sec_ch_ua!(
+ headers,
+ sec_ch_ua,
+ emulation_os.platform(),
+ emulation_os.is_mobile()
+ );
+ header_chrome_ua!(headers, ua);
+ header_chrome_sec_fetch!(headers);
+ header_chrome_accept!(zstd, headers);
+ headers
+}
+
+pub fn header_initializer_with_zstd_priority(
+ sec_ch_ua: &'static str,
+ ua: &'static str,
+ emulation_os: Platform,
+) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ header_chrome_sec_ch_ua!(
+ headers,
+ sec_ch_ua,
+ emulation_os.platform(),
+ emulation_os.is_mobile()
+ );
+ header_chrome_ua!(headers, ua);
+ header_chrome_sec_fetch!(headers);
+ header_chrome_accept!(zstd, headers);
+ headers.insert(
+ HeaderName::from_static("priority"),
+ HeaderValue::from_static("u=0, i"),
+ );
+ headers
+}
diff --git a/vendor/wreq-util/src/emulate/profile/chrome/http2.rs b/vendor/wreq-util/src/emulate/profile/chrome/http2.rs
new file mode 100644
index 00000000..f2e17b7f
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/chrome/http2.rs
@@ -0,0 +1,65 @@
+macro_rules! headers_stream_dependency {
+ () => {
+ StreamDependency::new(StreamId::zero(), 219, true)
+ };
+}
+
+macro_rules! pseudo_order {
+ () => {
+ PseudoOrder::builder()
+ .extend([
+ PseudoId::Method,
+ PseudoId::Authority,
+ PseudoId::Scheme,
+ PseudoId::Path,
+ ])
+ .build()
+ };
+}
+
+macro_rules! settings_order {
+ () => {
+ SettingsOrder::builder()
+ .extend([
+ SettingId::HeaderTableSize,
+ SettingId::EnablePush,
+ SettingId::MaxConcurrentStreams,
+ SettingId::InitialWindowSize,
+ SettingId::MaxFrameSize,
+ SettingId::MaxHeaderListSize,
+ SettingId::EnableConnectProtocol,
+ SettingId::NoRfc7540Priorities,
+ ])
+ .build()
+ };
+}
+
+macro_rules! http2_options {
+ (@base $builder:expr) => {
+ $builder
+ .initial_window_size(6291456)
+ .initial_connection_window_size(15728640)
+ .max_header_list_size(262144)
+ .header_table_size(65536)
+ .headers_stream_dependency(headers_stream_dependency!())
+ .headers_pseudo_order(pseudo_order!())
+ .settings_order(settings_order!())
+ };
+
+ (1) => {
+ http2_options!(@base Http2Options::builder())
+ .max_concurrent_streams(1000)
+ .build()
+ };
+ (2) => {
+ http2_options!(@base Http2Options::builder())
+ .max_concurrent_streams(1000)
+ .enable_push(false)
+ .build()
+ };
+ (3) => {
+ http2_options!(@base Http2Options::builder())
+ .enable_push(false)
+ .build()
+ };
+}
diff --git a/vendor/wreq-util/src/emulate/profile/chrome/tls.rs b/vendor/wreq-util/src/emulate/profile/chrome/tls.rs
new file mode 100644
index 00000000..6cddc446
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/chrome/tls.rs
@@ -0,0 +1,129 @@
+use super::*;
+
+macro_rules! tls_options {
+ (@build $builder:expr) => {
+ $builder.build().into()
+ };
+
+ (1) => {
+ tls_options!(@build ChromeTlsConfig::builder())
+ };
+ (2) => {
+ tls_options!(@build ChromeTlsConfig::builder().enable_ech_grease(true))
+ };
+ (3) => {
+ tls_options!(@build ChromeTlsConfig::builder().permute_extensions(true))
+ };
+ (4) => {
+ tls_options!(@build ChromeTlsConfig::builder()
+ .permute_extensions(true)
+ .enable_ech_grease(true))
+ };
+ (5) => {
+ tls_options!(@build ChromeTlsConfig::builder()
+ .permute_extensions(true)
+ .enable_ech_grease(true)
+ .pre_shared_key(true))
+ };
+ (6, $curves:expr) => {
+ tls_options!(@build ChromeTlsConfig::builder()
+ .permute_extensions(true)
+ .enable_ech_grease(true)
+ .pre_shared_key(true)
+ .curves($curves))
+ };
+ (7, $curves:expr) => {
+ tls_options!(@build ChromeTlsConfig::builder()
+ .permute_extensions(true)
+ .enable_ech_grease(true)
+ .pre_shared_key(true)
+ .curves($curves)
+ .alps_use_new_codepoint(true))
+ };
+}
+
+pub const CURVES_1: &str = join!(":", "X25519", "P-256", "P-384");
+pub const CURVES_2: &str = join!(":", "X25519Kyber768Draft00", "X25519", "P-256", "P-384");
+pub const CURVES_3: &str = join!(":", "X25519MLKEM768", "X25519", "P-256", "P-384");
+
+pub const CIPHER_LIST: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA"
+);
+
+pub const SIGALGS_LIST: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "rsa_pss_rsae_sha256",
+ "rsa_pkcs1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "rsa_pss_rsae_sha384",
+ "rsa_pkcs1_sha384",
+ "rsa_pss_rsae_sha512",
+ "rsa_pkcs1_sha512"
+);
+
+pub const CERTIFICATE_COMPRESSORS: &[&'static dyn CertificateCompressor] = &[&BrotliCompressor];
+
+#[derive(TypedBuilder)]
+pub struct ChromeTlsConfig {
+ #[builder(default = CURVES_1)]
+ curves: &'static str,
+
+ #[builder(default = SIGALGS_LIST)]
+ sigalgs_list: &'static str,
+
+ #[builder(default = CIPHER_LIST)]
+ cipher_list: &'static str,
+
+ #[builder(default = AlpsProtocol::HTTP2, setter(into))]
+ alps_protos: AlpsProtocol,
+
+ #[builder(default = false)]
+ alps_use_new_codepoint: bool,
+
+ #[builder(default = false, setter(into))]
+ enable_ech_grease: bool,
+
+ #[builder(default = false, setter(into))]
+ permute_extensions: bool,
+
+ #[builder(default = false, setter(into))]
+ pre_shared_key: bool,
+}
+
+impl From<ChromeTlsConfig> for TlsOptions {
+ fn from(val: ChromeTlsConfig) -> Self {
+ TlsOptions::builder()
+ .grease_enabled(true)
+ .enable_ocsp_stapling(true)
+ .enable_signed_cert_timestamps(true)
+ .curves_list(val.curves)
+ .sigalgs_list(val.sigalgs_list)
+ .cipher_list(val.cipher_list)
+ .min_tls_version(TlsVersion::TLS_1_2)
+ .max_tls_version(TlsVersion::TLS_1_3)
+ .permute_extensions(val.permute_extensions)
+ .pre_shared_key(val.pre_shared_key)
+ .enable_ech_grease(val.enable_ech_grease)
+ .alps_protocols([val.alps_protos])
+ .alps_use_new_codepoint(val.alps_use_new_codepoint)
+ .aes_hw_override(true)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS)
+ .build()
+ }
+}
diff --git a/vendor/wreq-util/src/emulate/profile/firefox.rs b/vendor/wreq-util/src/emulate/profile/firefox.rs
new file mode 100644
index 00000000..b4adb474
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/firefox.rs
@@ -0,0 +1,518 @@
+#[macro_use]
+mod http2;
+#[macro_use]
+mod tls;
+mod header;
+
+use header::*;
+use tls::*;
+
+use super::*;
+
+mod_generator!(
+ ff109,
+ tls_options!(2, CIPHER_LIST_1, CURVES_1),
+ http2_options!(2),
+ header_initializer,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_17; rv:109.0) Gecko/20000101 Firefox/109.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/109.0 Firefox/109.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Linux i686; rv:109.0) Gecko/20100101 Firefox/109.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPad; CPU OS 13_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/109.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff117,
+ ff109::build_emulation,
+ header_initializer,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:117.0) Gecko/20100101 Firefox/117.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_16_1; rv:117.0) Gecko/20010101 Firefox/117.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:117.0) Gecko/117.0 Firefox/117.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Linux i686; rv:117.0) Gecko/20100101 Firefox/117.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/117.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff128,
+ tls_options!(3, CIPHER_LIST_2, CURVES_1, KEY_SHARES_1),
+ http2_options!(3),
+ header_initializer_with_zstd,
+ [
+ (
+ MacOs,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:128.0) Gecko/20100101 Firefox/128.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:128.0) Gecko/128.0 Firefox/128.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/128.0 Mobile/15E148 Safari/605.1.15"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"
+ )
+ ]
+);
+
+mod_generator!(
+ ff133,
+ tls_options!(1, CIPHER_LIST_1, CURVES_2, KEY_SHARES_2),
+ http2_options!(1),
+ header_initializer_with_zstd,
+ [
+ (
+ MacOs,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:133.0) Gecko/133.0 Firefox/133.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:133.0) Gecko/20100101 Firefox/133.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/133.4 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff135,
+ tls_options!(4, CIPHER_LIST_1, CURVES_2, KEY_SHARES_2),
+ http2_options!(1),
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:135.0) Gecko/20100101 Firefox/135.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
+ )
+ ]
+);
+
+mod_generator!(
+ ff_private_135,
+ tls_options!(6, CIPHER_LIST_1, CURVES_2, KEY_SHARES_2),
+ http2_options!(1),
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:135.0) Gecko/20100101 Firefox/135.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
+ )
+ ]
+);
+
+mod_generator!(
+ ff_android_135,
+ tls_options!(5, CIPHER_LIST_1, CURVES_1, KEY_SHARES_1),
+ http2_options!(4),
+ header_initializer_with_zstd,
+ [(
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:135.0) Gecko/135.0 Firefox/135.0"
+ )]
+);
+
+mod_generator!(
+ ff136,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:136.0) Gecko/20100101 Firefox/136.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0"
+ )
+ ]
+);
+
+mod_generator!(
+ ff_private_136,
+ ff_private_135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:136.0) Gecko/20100101 Firefox/136.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0"
+ )
+ ]
+);
+
+mod_generator!(
+ ff139,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0"
+ ),
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; rv:136.0) Gecko/20100101 Firefox/139.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/139.0"
+ )
+ ]
+);
+
+mod_generator!(
+ ff142,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:142.0) Gecko/20100101 Firefox/142.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:142.0) Gecko/142.0 Firefox/142.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/142.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff143,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:143.0) Gecko/143.0 Firefox/143.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/143.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff144,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:144.0) Gecko/20100101 Firefox/144.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:144.0) Gecko/144.0 Firefox/144.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/144.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff145,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:145.0) Gecko/145.0 Firefox/145.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/145.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff146,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:146.0) Gecko/146.0 Firefox/146.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/146.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff147,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:147.0) Gecko/147.0 Firefox/147.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/147.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff148,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:148.0) Gecko/20100101 Firefox/148.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:148.0) Gecko/148.0 Firefox/148.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/148.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff149,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:149.0) Gecko/20100101 Firefox/149.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:149.0) Gecko/20100101 Firefox/149.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:149.0) Gecko/149.0 Firefox/149.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/149.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff150,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:150.0) Gecko/20100101 Firefox/150.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:150.0) Gecko/150.0 Firefox/150.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/150.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
+
+mod_generator!(
+ ff151,
+ ff135::build_emulation,
+ header_initializer_with_zstd,
+ [
+ (
+ Windows,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0"
+ ),
+ (
+ MacOS,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko/20100101 Firefox/151.0"
+ ),
+ (
+ Linux,
+ "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0"
+ ),
+ (
+ Android,
+ "Mozilla/5.0 (Android 13; Mobile; rv:151.0) Gecko/151.0 Firefox/151.0"
+ ),
+ (
+ IOS,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/151.0 Mobile/15E148 Safari/605.1.15"
+ )
+ ]
+);
diff --git a/vendor/wreq-util/src/emulate/profile/firefox/header.rs b/vendor/wreq-util/src/emulate/profile/firefox/header.rs
new file mode 100644
index 00000000..443bf696
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/firefox/header.rs
@@ -0,0 +1,21 @@
+use super::*;
+
+pub fn header_initializer(ua: &'static str) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ header_firefox_ua!(headers, ua);
+ header_firefox_accept!(headers);
+ header_firefox_sec_fetch!(headers);
+ headers
+}
+
+pub fn header_initializer_with_zstd(ua: &'static str) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ header_firefox_ua!(headers, ua);
+ header_firefox_accept!(zstd, headers);
+ header_firefox_sec_fetch!(headers);
+ headers.insert(
+ HeaderName::from_static("priority"),
+ HeaderValue::from_static("u=0, i"),
+ );
+ headers
+}
diff --git a/vendor/wreq-util/src/emulate/profile/firefox/http2.rs b/vendor/wreq-util/src/emulate/profile/firefox/http2.rs
new file mode 100644
index 00000000..7077c90c
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/firefox/http2.rs
@@ -0,0 +1,113 @@
+macro_rules! headers_stream_dependency {
+ (1) => {
+ StreamDependency::new(StreamId::zero(), 21, false)
+ };
+ (2) => {
+ StreamDependency::new(StreamId::from(13), 21, false)
+ };
+}
+
+macro_rules! pseudo_order {
+ () => {
+ PseudoOrder::builder()
+ .extend([
+ PseudoId::Method,
+ PseudoId::Path,
+ PseudoId::Authority,
+ PseudoId::Scheme,
+ ])
+ .build()
+ };
+}
+
+macro_rules! settings_order {
+ () => {
+ SettingsOrder::builder()
+ .extend([
+ SettingId::HeaderTableSize,
+ SettingId::EnablePush,
+ SettingId::MaxConcurrentStreams,
+ SettingId::InitialWindowSize,
+ SettingId::MaxFrameSize,
+ SettingId::MaxHeaderListSize,
+ SettingId::EnableConnectProtocol,
+ SettingId::NoRfc7540Priorities,
+ ])
+ .build()
+ };
+}
+
+macro_rules! http2_options {
+ (@base $builder:expr) => {
+ $builder
+ .initial_window_size(131072)
+ .max_frame_size(16384)
+ .initial_connection_window_size(12517377 + 65535)
+ .headers_pseudo_order(pseudo_order!())
+ .settings_order(settings_order!())
+ };
+
+ (1) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_stream_id(3)
+ .header_table_size(65536)
+ .enable_push(false)
+ .headers_stream_dependency(headers_stream_dependency!(1))
+ .build()
+ };
+ (2) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_stream_id(15)
+ .header_table_size(65536)
+ .headers_stream_dependency(headers_stream_dependency!(2))
+ .priorities(
+ Priorities::builder()
+ .extend([
+ Priority::new(
+ StreamId::from(3),
+ StreamDependency::new(StreamId::zero(), 200, false),
+ ),
+ Priority::new(
+ StreamId::from(5),
+ StreamDependency::new(StreamId::zero(), 100, false),
+ ),
+ Priority::new(
+ StreamId::from(7),
+ StreamDependency::new(StreamId::zero(), 0, false),
+ ),
+ Priority::new(
+ StreamId::from(9),
+ StreamDependency::new(StreamId::from(7), 0, false),
+ ),
+ Priority::new(
+ StreamId::from(11),
+ StreamDependency::new(StreamId::from(3), 0, false),
+ ),
+ Priority::new(
+ StreamId::from(13),
+ StreamDependency::new(StreamId::zero(), 240, false),
+ ),
+ ])
+ .build(),
+ )
+ .build()
+ };
+ (3) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_stream_id(3)
+ .header_table_size(65536)
+ .enable_push(false)
+ .max_concurrent_streams(0)
+ .headers_stream_dependency(headers_stream_dependency!(1))
+ .build()
+ };
+ (4) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_stream_id(3)
+ .header_table_size(4096)
+ .enable_push(false)
+ .initial_window_size(32768)
+ .headers_stream_dependency(headers_stream_dependency!(1))
+ .build()
+ };
+}
diff --git a/vendor/wreq-util/src/emulate/profile/firefox/tls.rs b/vendor/wreq-util/src/emulate/profile/firefox/tls.rs
new file mode 100644
index 00000000..5d73e360
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/firefox/tls.rs
@@ -0,0 +1,253 @@
+use super::*;
+
+macro_rules! tls_options {
+ (@build $builder:expr) => {
+ $builder.build().into()
+ };
+
+ (@base $builder:expr, $cipher_list:expr, $curves:expr) => {
+ $builder
+ .cipher_list($cipher_list)
+ .curves_list($curves)
+ };
+
+ (1, $cipher_list:expr, $curves:expr, $key_shares:expr) => {
+ tls_options!(@build tls_options!(@base FirefoxTlsConfig::builder(), $cipher_list, $curves)
+ .enable_ech_grease(true)
+ .pre_shared_key(true)
+ .psk_skip_session_tickets(true)
+ .key_shares($key_shares)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS))
+ };
+ (2, $cipher_list:expr, $curves:expr) => {
+ tls_options!(@build tls_options!(@base FirefoxTlsConfig::builder(), $cipher_list, $curves))
+ };
+ (3, $cipher_list:expr, $curves:expr, $key_shares:expr) => {
+ tls_options!(@build tls_options!(@base FirefoxTlsConfig::builder(), $cipher_list, $curves)
+ .session_ticket(false)
+ .enable_ech_grease(true)
+ .psk_dhe_ke(false)
+ .key_shares($key_shares))
+ };
+ (4, $cipher_list:expr, $curves:expr, $key_shares:expr) => {
+ tls_options!(@build tls_options!(@base FirefoxTlsConfig::builder(), $cipher_list, $curves)
+ .enable_ech_grease(true)
+ .enable_signed_cert_timestamps(true)
+ .session_ticket(true)
+ .pre_shared_key(true)
+ .psk_skip_session_tickets(true)
+ .key_shares($key_shares)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS))
+ };
+ (5, $cipher_list:expr, $curves:expr, $key_shares:expr) => {
+ tls_options!(@build tls_options!(@base FirefoxTlsConfig::builder(), $cipher_list, $curves)
+ .enable_ech_grease(true)
+ .pre_shared_key(true)
+ .psk_skip_session_tickets(true)
+ .key_shares($key_shares)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS))
+ };
+ (6, $cipher_list:expr, $curves:expr, $key_shares:expr) => {
+ tls_options!(@build tls_options!(@base FirefoxTlsConfig::builder(), $cipher_list, $curves)
+ .enable_ech_grease(true)
+ .enable_signed_cert_timestamps(true)
+ .session_ticket(false)
+ .psk_dhe_ke(false)
+ .key_shares($key_shares)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS))
+ };
+}
+
+pub const CURVES_1: &str = join!(
+ ":",
+ "X25519",
+ "P-256",
+ "P-384",
+ "P-521",
+ "ffdhe2048",
+ "ffdhe3072"
+);
+
+pub const CURVES_2: &str = join!(
+ ":",
+ "X25519MLKEM768",
+ "X25519",
+ "P-256",
+ "P-384",
+ "P-521",
+ "ffdhe2048",
+ "ffdhe3072"
+);
+
+pub const KEY_SHARES_1: &[KeyShare] = &[KeyShare::X25519, KeyShare::P256];
+
+pub const KEY_SHARES_2: &[KeyShare] =
+ &[KeyShare::X25519_MLKEM768, KeyShare::X25519, KeyShare::P256];
+
+pub const CIPHER_LIST_1: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA"
+);
+
+pub const CIPHER_LIST_2: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA"
+);
+
+pub const SIGALGS_LIST: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "ecdsa_secp521r1_sha512",
+ "rsa_pss_rsae_sha256",
+ "rsa_pss_rsae_sha384",
+ "rsa_pss_rsae_sha512",
+ "rsa_pkcs1_sha256",
+ "rsa_pkcs1_sha384",
+ "rsa_pkcs1_sha512",
+ "ecdsa_sha1",
+ "rsa_pkcs1_sha1"
+);
+
+pub const CERTIFICATE_COMPRESSORS: &[&'static dyn CertificateCompressor] =
+ &[&ZlibCompressor, &BrotliCompressor, &ZstdCompressor];
+
+pub const DELEGATED_CREDENTIALS: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "ecdsa_secp521r1_sha512",
+ "ecdsa_sha1"
+);
+
+pub const RECORD_SIZE_LIMIT: u16 = 0x4001;
+
+pub const EXTENSION_PERMUTATION_INDICES: &[ExtensionType] = &[
+ ExtensionType::SERVER_NAME,
+ ExtensionType::EXTENDED_MASTER_SECRET,
+ ExtensionType::RENEGOTIATE,
+ ExtensionType::SUPPORTED_GROUPS,
+ ExtensionType::EC_POINT_FORMATS,
+ ExtensionType::SESSION_TICKET,
+ ExtensionType::APPLICATION_LAYER_PROTOCOL_NEGOTIATION,
+ ExtensionType::STATUS_REQUEST,
+ ExtensionType::DELEGATED_CREDENTIAL,
+ ExtensionType::CERTIFICATE_TIMESTAMP,
+ ExtensionType::KEY_SHARE,
+ ExtensionType::SUPPORTED_VERSIONS,
+ ExtensionType::SIGNATURE_ALGORITHMS,
+ ExtensionType::PSK_KEY_EXCHANGE_MODES,
+ ExtensionType::RECORD_SIZE_LIMIT,
+ ExtensionType::CERT_COMPRESSION,
+ ExtensionType::ENCRYPTED_CLIENT_HELLO,
+];
+
+#[derive(TypedBuilder)]
+pub struct FirefoxTlsConfig {
+ #[builder(default = SIGALGS_LIST)]
+ sigalgs_list: &'static str,
+
+ #[builder(setter(into))]
+ cipher_list: &'static str,
+
+ #[builder(setter(into))]
+ curves_list: &'static str,
+
+ #[builder(default, setter(into))]
+ key_shares: Option<&'static [KeyShare]>,
+
+ #[builder(default = true)]
+ session_ticket: bool,
+
+ #[builder(default = false, setter(into))]
+ enable_ech_grease: bool,
+
+ #[builder(default = false, setter(into))]
+ enable_signed_cert_timestamps: bool,
+
+ #[builder(default = false, setter(into))]
+ pre_shared_key: bool,
+
+ #[builder(default = false, setter(into))]
+ psk_skip_session_tickets: bool,
+
+ #[builder(default = DELEGATED_CREDENTIALS, setter(into))]
+ delegated_credentials: &'static str,
+
+ #[builder(default = RECORD_SIZE_LIMIT, setter(into))]
+ record_size_limit: u16,
+
+ #[builder(default = true, setter(into))]
+ psk_dhe_ke: bool,
+
+ #[builder(default, setter(into))]
+ certificate_compressors: Option<&'static [&'static dyn CertificateCompressor]>,
+
+ #[builder(default = EXTENSION_PERMUTATION_INDICES, setter(into))]
+ extension_permutation: &'static [ExtensionType],
+}
+
+impl From<FirefoxTlsConfig> for TlsOptions {
+ fn from(val: FirefoxTlsConfig) -> Self {
+ let mut builder = TlsOptions::builder()
+ .curves_list(val.curves_list)
+ .sigalgs_list(val.sigalgs_list)
+ .cipher_list(val.cipher_list)
+ .session_ticket(val.session_ticket)
+ .delegated_credentials(val.delegated_credentials)
+ .record_size_limit(val.record_size_limit)
+ .enable_ocsp_stapling(true)
+ .enable_ech_grease(val.enable_ech_grease)
+ .enable_signed_cert_timestamps(val.enable_signed_cert_timestamps)
+ .alpn_protocols([AlpnProtocol::HTTP2, AlpnProtocol::HTTP1])
+ .min_tls_version(TlsVersion::TLS_1_2)
+ .max_tls_version(TlsVersion::TLS_1_3)
+ .pre_shared_key(val.pre_shared_key)
+ .psk_skip_session_ticket(val.psk_skip_session_tickets)
+ .psk_dhe_ke(val.psk_dhe_ke)
+ .preserve_tls13_cipher_list(true)
+ .extension_permutation(val.extension_permutation)
+ .aes_hw_override(true)
+ .random_aes_hw_override(true);
+
+ if let Some(key_shares) = val.key_shares {
+ builder = builder.key_shares(key_shares)
+ }
+
+ if let Some(certificate_compressors) = val.certificate_compressors {
+ builder = builder.certificate_compressors(certificate_compressors)
+ }
+
+ builder.build()
+ }
+}
diff --git a/vendor/wreq-util/src/emulate/profile/okhttp.rs b/vendor/wreq-util/src/emulate/profile/okhttp.rs
new file mode 100644
index 00000000..11342ab4
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/okhttp.rs
@@ -0,0 +1,241 @@
+use super::*;
+
+const CURVES: &str = join!(":", "X25519", "P-256", "P-384");
+
+const SIGALGS_LIST: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "rsa_pss_rsae_sha256",
+ "rsa_pkcs1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "rsa_pss_rsae_sha384",
+ "rsa_pkcs1_sha384",
+ "rsa_pss_rsae_sha512",
+ "rsa_pkcs1_sha512",
+ "rsa_pkcs1_sha1"
+);
+
+const CIPHER_LIST: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+);
+
+#[derive(TypedBuilder)]
+struct OkHttpTlsConfig {
+ #[builder(default = CURVES)]
+ curves: &'static str,
+
+ #[builder(default = SIGALGS_LIST)]
+ sigalgs_list: &'static str,
+
+ cipher_list: &'static str,
+}
+
+impl From<OkHttpTlsConfig> for TlsOptions {
+ fn from(val: OkHttpTlsConfig) -> Self {
+ TlsOptions::builder()
+ .enable_ocsp_stapling(true)
+ .curves_list(val.curves)
+ .sigalgs_list(val.sigalgs_list)
+ .cipher_list(val.cipher_list)
+ .min_tls_version(TlsVersion::TLS_1_2)
+ .max_tls_version(TlsVersion::TLS_1_3)
+ .aes_hw_override(true)
+ .build()
+ }
+}
+
+macro_rules! mod_generator {
+ ($mod_name:ident, $cipher:expr, $ua:expr) => {
+ pub(crate) mod $mod_name {
+ use super::*;
+
+ pub fn emulation(emulation: Emulation) -> wreq::Emulation {
+ build_emulation(stringify!($mod_name), emulation, $cipher, $ua)
+ }
+ }
+ };
+}
+
+fn build_emulation(
+ group: &'static str,
+ emulation: Emulation,
+ cipher_list: &'static str,
+ user_agent: &'static str,
+) -> wreq::Emulation {
+ let tls_options = OkHttpTlsConfig::builder()
+ .cipher_list(cipher_list)
+ .build()
+ .into();
+
+ let http2_options = emulation.http2.then(|| {
+ let settings_order = SettingsOrder::builder()
+ .extend([
+ SettingId::HeaderTableSize,
+ SettingId::EnablePush,
+ SettingId::MaxConcurrentStreams,
+ SettingId::InitialWindowSize,
+ SettingId::MaxFrameSize,
+ SettingId::MaxHeaderListSize,
+ SettingId::EnableConnectProtocol,
+ SettingId::NoRfc7540Priorities,
+ ])
+ .build();
+
+ Http2Options::builder()
+ .initial_window_size(16777216)
+ .initial_connection_window_size(16777216)
+ .headers_pseudo_order(
+ PseudoOrder::builder()
+ .extend([
+ PseudoId::Method,
+ PseudoId::Path,
+ PseudoId::Authority,
+ PseudoId::Scheme,
+ ])
+ .build(),
+ )
+ .settings_order(settings_order)
+ .build()
+ });
+
+ let headers = emulation.headers.then(|| {
+ let mut headers = HeaderMap::new();
+ headers.insert(ACCEPT, HeaderValue::from_static("*/*"));
+ headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ headers.insert(USER_AGENT, HeaderValue::from_static(user_agent));
+ #[cfg(feature = "emulation-compression")]
+ headers.insert(ACCEPT_ENCODING, HeaderValue::from_static("gzip"));
+ headers
+ });
+
+ build_standard_emulation(group, tls_options, http2_options, headers)
+}
+
+mod_generator!(
+ okhttp3_9,
+ join!(
+ ":",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+ ),
+ "MaiMemo/4.4.50_639 okhttp/3.9 Android/5.0 Channel/WanDouJia Device/alps+M8+Emulator (armeabi-v7a) Screen/4.44 Resolution/480x800 DId/aa6cde19def3806806d5374c4e5fd617 RAM/0.94 ROM/4.91 Theme/Day"
+);
+
+mod_generator!(
+ okhttp3_11,
+ join!(
+ ":",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+ ),
+ "NRC Audio/2.0.6 (nl.nrc.audio; build:36; Android 12; Sdk:31; Manufacturer:motorola; Model: moto g72) OkHttp/3.11.0"
+);
+
+mod_generator!(
+ okhttp3_13,
+ join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_AES_128_CCM_SHA256",
+ "TLS_AES_256_CCM_8_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+ ),
+ "GM-Android/6.112.2 (240590300; M:Google Pixel 7a; O:34; D:2b045e03986fa6dc) ObsoleteUrlFactory/1.0 OkHttp/3.13.0"
+);
+
+mod_generator!(
+ okhttp3_14,
+ CIPHER_LIST,
+ "DS podcast/2.0.1 (be.standaard.audio; build:9; Android 11; Sdk:30; Manufacturer:samsung; Model: SM-A405FN) OkHttp/3.14.0"
+);
+
+mod_generator!(
+ okhttp4_10,
+ CIPHER_LIST,
+ "GM-Android/6.112.2 (240590300; M:samsung SM-G781U1; O:33; D:edb34792871638d8) ObsoleteUrlFactory/1.0 OkHttp/4.10.0"
+);
+
+mod_generator!(
+ okhttp4_9,
+ join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA"
+ ),
+ "GM-Android/6.111.1 (240460200; M:motorola moto g power (2021); O:30; D:76ba9f6628d198c8) ObsoleteUrlFactory/1.0 OkHttp/4.9"
+);
+
+mod_generator!(okhttp4_12, CIPHER_LIST, "okhttp/4.12.0");
+
+mod_generator!(
+ okhttp5,
+ CIPHER_LIST,
+ "NRC Audio/2.0.6 (nl.nrc.audio; build:36; Android 14; Sdk:34; Manufacturer:OnePlus; Model: CPH2609) OkHttp/5.0.0-alpha2"
+);
diff --git a/vendor/wreq-util/src/emulate/profile/opera.rs b/vendor/wreq-util/src/emulate/profile/opera.rs
new file mode 100644
index 00000000..c751d390
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/opera.rs
@@ -0,0 +1,299 @@
+#[macro_use]
+mod http2;
+#[macro_use]
+mod tls;
+mod header;
+
+use header::*;
+use tls::*;
+
+use super::*;
+
+mod_generator!(
+ opera116,
+ tls_options!(CURVES),
+ http2_options!(),
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Opera";v="116", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 OPR/116.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Opera";v="116", "Chromium";v="131", "Not_A Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 OPR/116.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera117,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Opera";v="117""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not A(Brand";v="8", "Chromium";v="132", "Opera";v="117""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera118,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not(A:Brand";v="99", "Opera";v="118", "Chromium";v="133""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 OPR/118.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not(A:Brand";v="99", "Opera";v="118", "Chromium";v="133""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 OPR/118.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera119,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Opera";v="119""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 OPR/119.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="134", "Not:A-Brand";v="24", "Opera";v="119""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 OPR/119.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera120,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Opera";v="120""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 OPR/120.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="135", "Not:A-Brand";v="24", "Opera";v="120""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 OPR/120.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera121,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Opera";v="121", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 OPR/121.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Opera";v="121", "Chromium";v="137", "Not/A)Brand";v="24""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 OPR/121.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera122,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Opera";v="122""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 OPR/122.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="138", "Not=A?Brand";v="24", "Opera";v="122""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 OPR/122.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera123,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Opera";v="123""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 OPR/123.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="139", "Not=A?Brand";v="24", "Opera";v="123""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 OPR/123.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera124,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Opera";v="124""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 OPR/124.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Chromium";v="140", "Not=A?Brand";v="24", "Opera";v="124""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 OPR/124.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera125,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Opera";v="125", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 OPR/125.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Opera";v="125", "Not?A_Brand";v="8", "Chromium";v="141""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 OPR/125.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera126,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not:A-Brand";v="99", "Opera";v="126", "Chromium";v="142""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 OPR/126.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not:A-Brand";v="99", "Opera";v="126", "Chromium";v="142""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 OPR/126.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera127,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not:A-Brand";v="99", "Opera";v="127", "Chromium";v="143""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 OPR/127.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not:A-Brand";v="99", "Opera";v="127", "Chromium";v="143""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 OPR/127.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera128,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not:A-Brand";v="99", "Opera";v="128", "Chromium";v="144""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 OPR/128.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not:A-Brand";v="99", "Opera";v="128", "Chromium";v="144""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 OPR/128.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera129,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not:A-Brand";v="99", "Opera";v="129", "Chromium";v="145""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 OPR/129.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not:A-Brand";v="99", "Opera";v="129", "Chromium";v="145""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 OPR/129.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera130,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Not:A-Brand";v="99", "Opera";v="130", "Chromium";v="146""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 OPR/130.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Not:A-Brand";v="99", "Opera";v="130", "Chromium";v="146""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 OPR/130.0.0.0"
+ )
+ ]
+);
+
+mod_generator!(
+ opera131,
+ opera116::build_emulation,
+ header_initializer_with_zstd_priority,
+ [
+ (
+ MacOS,
+ r#""Opera";v="131", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 OPR/131.0.0.0"
+ ),
+ (
+ Windows,
+ r#""Opera";v="131", "Not.A/Brand";v="8", "Chromium";v="147""#,
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 OPR/131.0.0.0"
+ )
+ ]
+);
diff --git a/vendor/wreq-util/src/emulate/profile/opera/header.rs b/vendor/wreq-util/src/emulate/profile/opera/header.rs
new file mode 100644
index 00000000..91afa1e0
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/opera/header.rs
@@ -0,0 +1,30 @@
+use super::*;
+
+#[inline]
+pub fn header_initializer_with_zstd_priority(
+ sec_ch_ua: &'static str,
+ ua: &'static str,
+ emulation_os: Platform,
+) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ header_chrome_sec_ch_ua!(
+ headers,
+ sec_ch_ua,
+ emulation_os.platform(),
+ emulation_os.is_mobile()
+ );
+ header_chrome_ua!(headers, ua);
+
+ headers.insert(ACCEPT, HeaderValue::from_static("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"));
+ #[cfg(feature = "emulation-compression")]
+ headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br, zstd"),
+ );
+ headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ headers.insert(
+ HeaderName::from_static("priority"),
+ HeaderValue::from_static("u=0, i"),
+ );
+ headers
+}
diff --git a/vendor/wreq-util/src/emulate/profile/opera/http2.rs b/vendor/wreq-util/src/emulate/profile/opera/http2.rs
new file mode 100644
index 00000000..eb53e35d
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/opera/http2.rs
@@ -0,0 +1,50 @@
+macro_rules! headers_stream_dependency {
+ () => {
+ StreamDependency::new(StreamId::zero(), 219, true)
+ };
+}
+
+macro_rules! pseudo_order {
+ () => {
+ PseudoOrder::builder()
+ .extend([
+ PseudoId::Method,
+ PseudoId::Authority,
+ PseudoId::Scheme,
+ PseudoId::Path,
+ ])
+ .build()
+ };
+}
+
+macro_rules! settings_order {
+ () => {
+ SettingsOrder::builder()
+ .extend([
+ SettingId::HeaderTableSize,
+ SettingId::EnablePush,
+ SettingId::MaxConcurrentStreams,
+ SettingId::InitialWindowSize,
+ SettingId::MaxFrameSize,
+ SettingId::MaxHeaderListSize,
+ SettingId::EnableConnectProtocol,
+ SettingId::NoRfc7540Priorities,
+ ])
+ .build()
+ };
+}
+
+macro_rules! http2_options {
+ () => {
+ Http2Options::builder()
+ .initial_window_size(6291456)
+ .initial_connection_window_size(15728640)
+ .max_header_list_size(262144)
+ .header_table_size(65536)
+ .enable_push(false)
+ .headers_stream_dependency(headers_stream_dependency!())
+ .headers_pseudo_order(pseudo_order!())
+ .settings_order(settings_order!())
+ .build()
+ };
+}
diff --git a/vendor/wreq-util/src/emulate/profile/opera/tls.rs b/vendor/wreq-util/src/emulate/profile/opera/tls.rs
new file mode 100644
index 00000000..434352c0
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/opera/tls.rs
@@ -0,0 +1,97 @@
+use super::*;
+
+macro_rules! tls_options {
+ ($curves:expr) => {
+ OperaTlsConfig::builder()
+ .curves($curves)
+ .permute_extensions(true)
+ .pre_shared_key(true)
+ .enable_ech_grease(true)
+ .build()
+ .into()
+ };
+}
+
+pub const CURVES: &str = join!(":", "X25519MLKEM768", "X25519", "P-256", "P-384");
+
+pub const CIPHER_LIST: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA"
+);
+
+pub const SIGALGS_LIST: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "rsa_pss_rsae_sha256",
+ "rsa_pkcs1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "rsa_pss_rsae_sha384",
+ "rsa_pkcs1_sha384",
+ "rsa_pss_rsae_sha512",
+ "rsa_pkcs1_sha512"
+);
+
+pub const CERTIFICATE_COMPRESSORS: &[&'static dyn CertificateCompressor] = &[&BrotliCompressor];
+
+#[derive(TypedBuilder)]
+pub struct OperaTlsConfig {
+ #[builder(default = CURVES)]
+ curves: &'static str,
+
+ #[builder(default = SIGALGS_LIST)]
+ sigalgs_list: &'static str,
+
+ #[builder(default = CIPHER_LIST)]
+ cipher_list: &'static str,
+
+ #[builder(default = AlpsProtocol::HTTP2, setter(into))]
+ alps_protos: AlpsProtocol,
+
+ #[builder(default = false)]
+ alps_use_new_codepoint: bool,
+
+ #[builder(default = false, setter(into))]
+ enable_ech_grease: bool,
+
+ #[builder(default = false, setter(into))]
+ permute_extensions: bool,
+
+ #[builder(default = false, setter(into))]
+ pre_shared_key: bool,
+}
+
+impl From<OperaTlsConfig> for TlsOptions {
+ fn from(val: OperaTlsConfig) -> Self {
+ TlsOptions::builder()
+ .grease_enabled(true)
+ .enable_ocsp_stapling(true)
+ .enable_signed_cert_timestamps(true)
+ .curves_list(val.curves)
+ .sigalgs_list(val.sigalgs_list)
+ .cipher_list(val.cipher_list)
+ .min_tls_version(TlsVersion::TLS_1_2)
+ .max_tls_version(TlsVersion::TLS_1_3)
+ .permute_extensions(val.permute_extensions)
+ .pre_shared_key(val.pre_shared_key)
+ .enable_ech_grease(val.enable_ech_grease)
+ .alps_protocols([val.alps_protos])
+ .alps_use_new_codepoint(val.alps_use_new_codepoint)
+ .aes_hw_override(true)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS)
+ .build()
+ }
+}
diff --git a/vendor/wreq-util/src/emulate/profile/safari.rs b/vendor/wreq-util/src/emulate/profile/safari.rs
new file mode 100644
index 00000000..69ac983b
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/safari.rs
@@ -0,0 +1,222 @@
+#[macro_use]
+mod http2;
+#[macro_use]
+mod tls;
+mod header;
+
+use header::*;
+use tls::*;
+
+use super::*;
+
+mod_generator!(
+ safari15_3,
+ tls_options!(1, CIPHER_LIST_1),
+ http2_options!(4),
+ header_initializer_for_15,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari15_5,
+ safari15_3::build_emulation,
+ header_initializer_for_15,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari15_6_1,
+ tls_options!(1, CIPHER_LIST_2),
+ http2_options!(4),
+ header_initializer_for_15,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari16,
+ safari15_6_1::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari16_5,
+ safari15_6_1::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari17_4_1,
+ safari15_6_1::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari_ios_16_5,
+ tls_options!(1, CIPHER_LIST_2),
+ http2_options!(1),
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari17_0,
+ tls_options!(1, CIPHER_LIST_2),
+ http2_options!(5),
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari17_2_1,
+ safari17_0::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari17_5,
+ safari17_0::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari17_6,
+ safari17_0::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari_ios_17_2,
+ tls_options!(1, CIPHER_LIST_2),
+ http2_options!(2),
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari_ios_17_4_1,
+ safari_ios_17_2::build_emulation,
+ header_initializer_for_16_17,
+ "Mozilla/5.0 (iPad; CPU OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari18,
+ tls_options!(1, CIPHER_LIST_2),
+ http2_options!(3),
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari_ipad_18,
+ safari18::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (iPad; CPU OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari_ios_18_1_1,
+ safari18::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari18_2,
+ tls_options!(2, CIPHER_LIST_2, SIGALGS_LIST_2),
+ http2_options!(3),
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari18_3,
+ safari18_2::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari18_3_1,
+ safari18_2::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari18_5,
+ tls_options!(2, CIPHER_LIST_2, SIGALGS_LIST_2),
+ http2_options!(6),
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari26,
+ tls_options!(3, CIPHER_LIST_3, SIGALGS_LIST_2, CURVES_2),
+ http2_options!(6),
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari_ipad_26,
+ safari26::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (iPad; CPU OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari_ios_26,
+ safari26::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 26_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari26_1,
+ safari18_5::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.1 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari_ios_26_2,
+ safari26::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Mobile/15E148 Safari/604.1"
+);
+
+mod_generator!(
+ safari26_2,
+ safari18_5::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari26_3,
+ safari18_5::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari26_4,
+ safari18_5::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Safari/605.1.15"
+);
+
+mod_generator!(
+ safari_ipad_26_2,
+ safari26::build_emulation,
+ header_initializer_for_18,
+ "Mozilla/5.0 (iPad; CPU OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Mobile/15E148 Safari/604.1"
+);
diff --git a/vendor/wreq-util/src/emulate/profile/safari/header.rs b/vendor/wreq-util/src/emulate/profile/safari/header.rs
new file mode 100644
index 00000000..aef337ca
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/safari/header.rs
@@ -0,0 +1,59 @@
+use super::*;
+
+#[inline]
+pub fn header_initializer_for_15(ua: &'static str) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ headers.insert(USER_AGENT, HeaderValue::from_static(ua));
+ headers.insert(
+ ACCEPT,
+ HeaderValue::from_static("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"),
+ );
+ headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ #[cfg(feature = "emulation-compression")]
+ headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br"),
+ );
+ headers
+}
+
+#[inline]
+pub fn header_initializer_for_16_17(ua: &'static str) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ headers.insert(
+ ACCEPT,
+ HeaderValue::from_static("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"),
+ );
+ headers.insert("sec-fetch-site", HeaderValue::from_static("none"));
+ #[cfg(feature = "emulation-compression")]
+ headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br"),
+ );
+ headers.insert("sec-fetch-mode", HeaderValue::from_static("navigate"));
+ headers.insert(USER_AGENT, HeaderValue::from_static(ua));
+ headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ headers.insert("sec-fetch-dest", HeaderValue::from_static("document"));
+ headers
+}
+
+#[inline]
+pub fn header_initializer_for_18(ua: &'static str) -> HeaderMap {
+ let mut headers = HeaderMap::new();
+ headers.insert("sec-fetch-dest", HeaderValue::from_static("document"));
+ headers.insert(USER_AGENT, HeaderValue::from_static(ua));
+ headers.insert(
+ ACCEPT,
+ HeaderValue::from_static("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"),
+ );
+ headers.insert("sec-fetch-site", HeaderValue::from_static("none"));
+ headers.insert("sec-fetch-mode", HeaderValue::from_static("navigate"));
+ headers.insert(ACCEPT_LANGUAGE, HeaderValue::from_static("en-US,en;q=0.9"));
+ headers.insert("priority", HeaderValue::from_static("u=0, i"));
+ #[cfg(feature = "emulation-compression")]
+ headers.insert(
+ ACCEPT_ENCODING,
+ HeaderValue::from_static("gzip, deflate, br"),
+ );
+ headers
+}
diff --git a/vendor/wreq-util/src/emulate/profile/safari/http2.rs b/vendor/wreq-util/src/emulate/profile/safari/http2.rs
new file mode 100644
index 00000000..e9008645
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/safari/http2.rs
@@ -0,0 +1,116 @@
+macro_rules! headers_pseudo_order {
+ (1) => {
+ PseudoOrder::builder()
+ .extend([
+ PseudoId::Method,
+ PseudoId::Scheme,
+ PseudoId::Path,
+ PseudoId::Authority,
+ ])
+ .build()
+ };
+ (2) => {
+ PseudoOrder::builder()
+ .extend([
+ PseudoId::Method,
+ PseudoId::Scheme,
+ PseudoId::Authority,
+ PseudoId::Path,
+ ])
+ .build()
+ };
+}
+
+macro_rules! settings_order {
+ (1) => {
+ SettingsOrder::builder()
+ .extend([
+ SettingId::HeaderTableSize,
+ SettingId::EnablePush,
+ SettingId::InitialWindowSize,
+ SettingId::MaxConcurrentStreams,
+ SettingId::MaxFrameSize,
+ SettingId::MaxHeaderListSize,
+ SettingId::EnableConnectProtocol,
+ SettingId::NoRfc7540Priorities,
+ ])
+ .build()
+ };
+ (2) => {
+ SettingsOrder::builder()
+ .extend([
+ SettingId::HeaderTableSize,
+ SettingId::EnablePush,
+ SettingId::MaxConcurrentStreams,
+ SettingId::InitialWindowSize,
+ SettingId::MaxFrameSize,
+ SettingId::MaxHeaderListSize,
+ SettingId::EnableConnectProtocol,
+ SettingId::NoRfc7540Priorities,
+ ])
+ .build()
+ };
+}
+
+macro_rules! http2_options {
+ (@base $builder:expr) => {
+ $builder
+ .max_concurrent_streams(100)
+ };
+
+ (1) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_window_size(2097152)
+ .initial_connection_window_size(10551295)
+ .headers_pseudo_order(headers_pseudo_order!(1))
+ .settings_order(settings_order!(1))
+ .build()
+ };
+ (2) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_window_size(2097152)
+ .initial_connection_window_size(10551295)
+ .enable_push(false)
+ .headers_pseudo_order(headers_pseudo_order!(1))
+ .settings_order(settings_order!(1))
+ .build()
+ };
+ (3) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_window_size(2097152)
+ .initial_connection_window_size(10485760)
+ .enable_push(false)
+ .enable_connect_protocol(true)
+ .no_rfc7540_priorities(true)
+ .headers_pseudo_order(headers_pseudo_order!(2))
+ .settings_order(settings_order!(2))
+ .build()
+ };
+ (4) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_window_size(4194304)
+ .initial_connection_window_size(10551295)
+ .headers_pseudo_order(headers_pseudo_order!(1))
+ .settings_order(settings_order!(1))
+ .build()
+ };
+ (5) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_window_size(4194304)
+ .initial_connection_window_size(10551295)
+ .enable_push(false)
+ .headers_pseudo_order(headers_pseudo_order!(1))
+ .settings_order(settings_order!(1))
+ .build()
+ };
+ (6) => {
+ http2_options!(@base Http2Options::builder())
+ .initial_window_size(2097152)
+ .initial_connection_window_size(10485760)
+ .enable_push(false)
+ .no_rfc7540_priorities(true)
+ .headers_pseudo_order(headers_pseudo_order!(2))
+ .settings_order(settings_order!(2))
+ .build()
+ };
+}
diff --git a/vendor/wreq-util/src/emulate/profile/safari/tls.rs b/vendor/wreq-util/src/emulate/profile/safari/tls.rs
new file mode 100644
index 00000000..a412a8d4
--- /dev/null
+++ b/vendor/wreq-util/src/emulate/profile/safari/tls.rs
@@ -0,0 +1,177 @@
+use super::*;
+
+macro_rules! tls_options {
+ (1, $cipher_list:expr) => {
+ SafariTlsConfig::builder()
+ .cipher_list($cipher_list)
+ .build()
+ .into()
+ };
+ (2, $cipher_list:expr, $sigalgs_list:expr) => {
+ SafariTlsConfig::builder()
+ .cipher_list($cipher_list)
+ .sigalgs_list($sigalgs_list)
+ .build()
+ .into()
+ };
+ (3, $cipher_list:expr, $sigalgs_list:expr, $curves:expr) => {
+ SafariTlsConfig::builder()
+ .curves($curves)
+ .cipher_list($cipher_list)
+ .sigalgs_list($sigalgs_list)
+ .preserve_tls13_cipher_list(true)
+ .min_tls_version(wreq::tls::TlsVersion::TLS_1_2)
+ .max_tls_version(wreq::tls::TlsVersion::TLS_1_3)
+ .build()
+ .into()
+ };
+}
+
+pub const CURVES_1: &str = join!(":", "X25519", "P-256", "P-384", "P-521");
+
+pub const CURVES_2: &str = join!(":", "X25519MLKEM768", "X25519", "P-256", "P-384", "P-521");
+
+pub const CIPHER_LIST_1: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_CBC_SHA256",
+ "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+);
+pub const CIPHER_LIST_2: &str = join!(
+ ":",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+);
+pub const CIPHER_LIST_3: &str = join!(
+ ":",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+ "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
+);
+
+pub const SIGALGS_LIST_1: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "rsa_pss_rsae_sha256",
+ "rsa_pkcs1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "ecdsa_sha1",
+ "rsa_pss_rsae_sha384",
+ "rsa_pss_rsae_sha384",
+ "rsa_pkcs1_sha384",
+ "rsa_pss_rsae_sha512",
+ "rsa_pkcs1_sha512",
+ "rsa_pkcs1_sha1"
+);
+
+pub const SIGALGS_LIST_2: &str = join!(
+ ":",
+ "ecdsa_secp256r1_sha256",
+ "rsa_pss_rsae_sha256",
+ "rsa_pkcs1_sha256",
+ "ecdsa_secp384r1_sha384",
+ "rsa_pss_rsae_sha384",
+ "rsa_pss_rsae_sha384",
+ "rsa_pkcs1_sha384",
+ "rsa_pss_rsae_sha512",
+ "rsa_pkcs1_sha512",
+ "rsa_pkcs1_sha1"
+);
+
+pub const CERTIFICATE_COMPRESSORS: &[&'static dyn CertificateCompressor] = &[&ZlibCompressor];
+
+#[derive(TypedBuilder)]
+pub struct SafariTlsConfig {
+ #[builder(default = TlsVersion::TLS_1_0)]
+ min_tls_version: TlsVersion,
+
+ #[builder(default = TlsVersion::TLS_1_3)]
+ max_tls_version: TlsVersion,
+
+ #[builder(default = CURVES_1)]
+ curves: &'static str,
+
+ #[builder(default = SIGALGS_LIST_1)]
+ sigalgs_list: &'static str,
+
+ cipher_list: &'static str,
+
+ #[builder(default, setter(strip_option))]
+ preserve_tls13_cipher_list: Option<bool>,
+}
+
+impl From<SafariTlsConfig> for TlsOptions {
+ fn from(val: SafariTlsConfig) -> Self {
+ TlsOptions::builder()
+ .session_ticket(false)
+ .grease_enabled(true)
+ .enable_ocsp_stapling(true)
+ .enable_signed_cert_timestamps(true)
+ .preserve_tls13_cipher_list(val.preserve_tls13_cipher_list)
+ .curves_list(val.curves)
+ .sigalgs_list(val.sigalgs_list)
+ .cipher_list(val.cipher_list)
+ .min_tls_version(val.min_tls_version)
+ .max_tls_version(val.max_tls_version)
+ .certificate_compressors(CERTIFICATE_COMPRESSORS)
+ .build()
+ }
+}
diff --git a/vendor/wreq-util/src/lib.rs b/vendor/wreq-util/src/lib.rs
new file mode 100644
index 00000000..03a68e69
--- /dev/null
+++ b/vendor/wreq-util/src/lib.rs
@@ -0,0 +1,14 @@
+#![deny(unused)]
+#![deny(unsafe_code)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
+#![cfg_attr(test, deny(warnings))]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![doc = include_str!("../README.md")]
+
+#[cfg(feature = "emulation")]
+pub mod emulate;
+mod rand;
+pub mod tower;
+
+#[cfg(feature = "emulation")]
+pub use self::emulate::{Emulation, Platform, Profile};
diff --git a/vendor/wreq-util/src/rand.rs b/vendor/wreq-util/src/rand.rs
new file mode 100644
index 00000000..2bc5f195
--- /dev/null
+++ b/vendor/wreq-util/src/rand.rs
@@ -0,0 +1,24 @@
+use std::{
+ cell::Cell,
+ collections::hash_map::RandomState,
+ hash::{BuildHasher, Hasher},
+};
+
+// from: https://github.com/seanmonstar/reqwest/blob/5d5bf355744b181d31533501133ad9fbf99e8849/src/util.rs#L28
+pub(crate) fn fast_random() -> u64 {
+ thread_local! {
+ static KEY: RandomState = RandomState::new();
+ static COUNTER: Cell<u64> = const { Cell::new(0) };
+ }
+
+ KEY.with(|key| {
+ COUNTER.with(|ctr| {
+ let n = ctr.get().wrapping_add(1);
+ ctr.set(n);
+
+ let mut h = key.build_hasher();
+ h.write_u64(n);
+ h.finish()
+ })
+ })
+}
diff --git a/vendor/wreq-util/src/tower.rs b/vendor/wreq-util/src/tower.rs
new file mode 100644
index 00000000..fe20ba25
--- /dev/null
+++ b/vendor/wreq-util/src/tower.rs
@@ -0,0 +1,7 @@
+//! Tower middleware helpers for `wreq`.
+//!
+//! Modules here are feature-gated. Enable the feature to make the tower middleware
+//! available and to include its docs.
+
+#[cfg(feature = "tower-delay")]
+pub mod delay;
diff --git a/vendor/wreq-util/src/tower/delay.rs b/vendor/wreq-util/src/tower/delay.rs
new file mode 100644
index 00000000..2bb0ff59
--- /dev/null
+++ b/vendor/wreq-util/src/tower/delay.rs
@@ -0,0 +1,98 @@
+//! Request delay middleware.
+//!
+//! Adds configurable delays before HTTP requests — useful for rate limiting,
+//! testing under slow network conditions, or just being polite to APIs.
+//!
+//! # Quick Start
+//!
+//! Fixed 1-second delay:
+//!
+//! ```no_run
+//! use std::time::Duration;
+//! use wreq::Client;
+//! use wreq_util::middleware::delay::DelayLayer;
+//!
+//! let client = Client::builder()
+//! .layer(DelayLayer::new(Duration::from_secs(1)))
+//! .build()?;
+//! # Ok::<(), wreq::Error>(())
+//! ```
+//!
+//! Random jitter (0.8s ~ 1.2s):
+//!
+//! ```no_run
+//! use std::time::Duration;
+//! use wreq::Client;
+//! use wreq_util::middleware::delay::JitterDelayLayer;
+//!
+//! let client = Client::builder()
+//! .layer(JitterDelayLayer::new(Duration::from_secs(1), 0.2))
+//! .build()?;
+//! # Ok::<(), wreq::Error>(())
+//! ```
+//!
+//! # Conditional Delays
+//!
+//! Use `.when()` to apply delays only to matching requests:
+//!
+//! ```ignore
+//! // Only delay POST requests
+//! DelayLayer::new(Duration::from_secs(1))
+//! .when(|req: &http::Request<_>| req.method() == http::Method::POST)
+//!
+//! // Jitter on specific paths
+//! JitterDelayLayer::new(Duration::from_millis(500), 0.3)
+//! .when(|req: &http::Request<_>| req.uri().path().starts_with("/api"))
+//! ```
+//!
+//! # Notes
+//!
+//! - Delays are async and won't block the runtime
+//! - Not a substitute for proper rate limiters — servers can still see timing patterns
+//! - Keep delays short in hot paths
+
+mod future;
+mod layer;
+mod service;
+
+use std::time::Duration;
+
+pub use self::{
+ future::ResponseFuture,
+ layer::{DelayLayer, DelayLayerWith, JitterDelayLayer, JitterDelayLayerWith},
+ service::{Delay, DelayWith, JitterDelay, JitterDelayWith},
+};
+
+/// Compute a randomized duration in `[base * (1 - pct), base * (1 + pct)]`.
+fn jittered_duration(base: Duration, pct: f64) -> Duration {
+ let jitter = base.mul_f64(pct);
+ let low = base.saturating_sub(jitter);
+ let high = base.saturating_add(jitter);
+
+ if low >= high {
+ return base;
+ }
+
+ // Generate pseudo-random value using multiple entropy sources
+ let time_entropy = {
+ use std::time::SystemTime;
+ SystemTime::now()
+ .duration_since(SystemTime::UNIX_EPOCH)
+ .map(|d| d.as_nanos() as u64)
+ .unwrap_or(0)
+ };
+
+ // Use stack address as additional entropy source
+ let addr_entropy = (&time_entropy as *const u64 as u64).wrapping_mul(0x517cc1b727220a95);
+
+ // Mix entropy sources with a simple but effective hash
+ let mixed = time_entropy
+ .wrapping_add(addr_entropy)
+ .wrapping_mul(0x9e3779b97f4a7c15);
+
+ // Convert to fraction in [0, 1)
+ let frac = (mixed as f64) / (u64::MAX as f64);
+
+ let span = (high - low).as_secs_f64();
+ low + Duration::from_secs_f64(span * frac)
+}
diff --git a/vendor/wreq-util/src/tower/delay/future.rs b/vendor/wreq-util/src/tower/delay/future.rs
new file mode 100644
index 00000000..944cb0b8
--- /dev/null
+++ b/vendor/wreq-util/src/tower/delay/future.rs
@@ -0,0 +1,43 @@
+use std::{
+ pin::Pin,
+ task::{Context, Poll, ready},
+};
+
+use pin_project_lite::pin_project;
+use tokio::time::Sleep;
+use tower::BoxError;
+
+pin_project! {
+ /// Response future for [`Delay`].
+ ///
+ /// [`Delay`]: super::Delay
+ #[derive(Debug)]
+ pub struct ResponseFuture<S> {
+ #[pin]
+ response: S,
+ #[pin]
+ sleep: Sleep,
+ }
+}
+
+impl<S> ResponseFuture<S> {
+ // Create a new [`ResponseFuture`]
+ #[inline]
+ pub(crate) fn new(response: S, sleep: Sleep) -> Self {
+ ResponseFuture { response, sleep }
+ }
+}
+
+impl<F, S, E> Future for ResponseFuture<F>
+where
+ F: Future<Output = Result<S, E>>,
+ E: Into<BoxError>,
+{
+ type Output = Result<S, BoxError>;
+
+ fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+ let this = self.project();
+ ready!(this.sleep.poll(cx));
+ this.response.poll(cx).map_err(Into::into)
+ }
+}
diff --git a/vendor/wreq-util/src/tower/delay/layer.rs b/vendor/wreq-util/src/tower/delay/layer.rs
new file mode 100644
index 00000000..043e1268
--- /dev/null
+++ b/vendor/wreq-util/src/tower/delay/layer.rs
@@ -0,0 +1,201 @@
+use std::time::Duration;
+
+use tower::Layer;
+
+use super::service::{Delay, DelayWith, JitterDelay, JitterDelayWith};
+
+/// A Tower [`Layer`] that introduces a fixed delay before each request.
+#[derive(Clone, Debug)]
+pub struct DelayLayer {
+ delay: Duration,
+}
+
+/// Conditional delay [`Layer`], applies delay based on a predicate.
+///
+/// Created via [`DelayLayer::when`].
+#[derive(Clone, Debug)]
+pub struct DelayLayerWith<P> {
+ delay: Duration,
+ predicate: P,
+}
+
+/// A Tower [`Layer`] that introduces a jittered delay before each request.
+///
+/// The actual delay for each request will be randomly chosen within the range
+/// `[base - base*pct, base + base*pct]`.
+///
+/// # Example
+///
+/// ```no_run
+/// use std::time::Duration;
+/// use wreq::Client;
+/// use wreq_util::middleware::delay::JitterDelayLayer;
+///
+/// // Creates delays in range [0.8s, 1.2s] (1s ± 20%)
+/// let client = Client::builder()
+/// .layer(JitterDelayLayer::new(Duration::from_secs(1), 0.2))
+/// .build()?;
+/// # Ok::<(), wreq::Error>(())
+/// ```
+#[derive(Clone, Debug)]
+pub struct JitterDelayLayer {
+ base: Duration,
+ pct: f64,
+}
+
+/// Conditional jitter delay [`Layer`], applies delay based on a predicate.
+///
+/// Created via [`JitterDelayLayer::when`].
+#[derive(Clone, Debug)]
+pub struct JitterDelayLayerWith<P> {
+ base: Duration,
+ pct: f64,
+ predicate: P,
+}
+
+// ===== impl DelayLayer =====
+
+impl DelayLayer {
+ /// Create a new [`DelayLayer`] with the given delay duration.
+ #[inline]
+ pub const fn new(delay: Duration) -> Self {
+ DelayLayer { delay }
+ }
+
+ /// Apply delay only to requests that satisfy a predicate.
+ ///
+ /// Requests that don't match the predicate will pass through without delay.
+ ///
+ /// # Example
+ ///
+ /// ```ignore
+ /// use std::time::Duration;
+ /// use http::Request;
+ /// use wreq_util::middleware::delay::DelayLayer;
+ ///
+ /// // Only delay POST requests
+ /// let layer = DelayLayer::new(Duration::from_secs(1))
+ /// .when(|req: &Request<_>| req.method() == http::Method::POST);
+ /// ```
+ pub fn when<P, Req>(self, predicate: P) -> DelayLayerWith<P>
+ where
+ P: Fn(&Req) -> bool + Clone,
+ {
+ DelayLayerWith::new(self.delay, predicate)
+ }
+}
+
+impl<S> Layer<S> for DelayLayer {
+ type Service = Delay<S>;
+
+ #[inline]
+ fn layer(&self, service: S) -> Self::Service {
+ Delay::new(service, self.delay)
+ }
+}
+
+// ===== impl DelayLayerWith =====
+
+impl<P> DelayLayerWith<P> {
+ /// Creates a new [`DelayLayerWith`].
+ #[inline]
+ pub fn new(delay: Duration, predicate: P) -> Self {
+ Self { delay, predicate }
+ }
+}
+
+impl<P, S> Layer<S> for DelayLayerWith<P>
+where
+ P: Clone,
+{
+ type Service = DelayWith<S, P>;
+
+ #[inline]
+ fn layer(&self, inner: S) -> Self::Service {
+ DelayWith::new(inner, self.delay, self.predicate.clone())
+ }
+}
+
+// ===== impl JitterDelayLayer =====
+
+impl JitterDelayLayer {
+ /// Create a new [`JitterDelayLayer`] with the given base delay and jitter percentage.
+ ///
+ /// # Arguments
+ /// * `base` - The base delay duration
+ /// * `pct` - The jitter percentage (0.0 to 1.0), representing ±pct deviation
+ ///
+ /// # Example
+ ///
+ /// ```
+ /// use std::time::Duration;
+ /// use wreq_util::middleware::delay::JitterDelayLayer;
+ ///
+ /// // Creates delays in range [800ms, 1200ms]
+ /// let layer = JitterDelayLayer::new(Duration::from_secs(1), 0.2);
+ /// ```
+ #[inline]
+ pub fn new(base: Duration, pct: f64) -> Self {
+ Self {
+ base,
+ pct: pct.clamp(0.0, 1.0),
+ }
+ }
+
+ /// Apply jitter delay only to requests that satisfy a predicate.
+ ///
+ /// Requests that don't match the predicate will pass through without delay.
+ ///
+ /// # Example
+ ///
+ /// ```ignore
+ /// use std::time::Duration;
+ /// use http::Request;
+ /// use wreq_util::middleware::delay::JitterDelayLayer;
+ ///
+ /// // Only delay requests to paths starting with "/slow"
+ /// let layer = JitterDelayLayer::new(Duration::from_secs(1), 0.2)
+ /// .when(|req: &Request<_>| req.uri().path().starts_with("/slow"));
+ /// ```
+ pub fn when<P, Req>(self, predicate: P) -> JitterDelayLayerWith<P>
+ where
+ P: Fn(&Req) -> bool + Clone,
+ {
+ JitterDelayLayerWith::new(self.base, self.pct, predicate)
+ }
+}
+
+impl<S> Layer<S> for JitterDelayLayer {
+ type Service = JitterDelay<S>;
+
+ #[inline]
+ fn layer(&self, inner: S) -> Self::Service {
+ JitterDelay::new(inner, self.base, self.pct)
+ }
+}
+
+// ===== impl JitterDelayLayerWith =====
+
+impl<P> JitterDelayLayerWith<P> {
+ /// Creates a new [`JitterDelayLayerWith`].
+ #[inline]
+ pub fn new(base: Duration, pct: f64, predicate: P) -> Self {
+ Self {
+ base,
+ pct: pct.clamp(0.0, 1.0),
+ predicate,
+ }
+ }
+}
+
+impl<P, S> Layer<S> for JitterDelayLayerWith<P>
+where
+ P: Clone,
+{
+ type Service = JitterDelayWith<S, P>;
+
+ #[inline]
+ fn layer(&self, inner: S) -> Self::Service {
+ JitterDelayWith::new(inner, self.base, self.pct, self.predicate.clone())
+ }
+}
diff --git a/vendor/wreq-util/src/tower/delay/service.rs b/vendor/wreq-util/src/tower/delay/service.rs
new file mode 100644
index 00000000..741900e9
--- /dev/null
+++ b/vendor/wreq-util/src/tower/delay/service.rs
@@ -0,0 +1,190 @@
+use std::{
+ task::{Context, Poll},
+ time::Duration,
+};
+
+use tower::{BoxError, Service};
+
+use super::{future::ResponseFuture, jittered_duration};
+
+/// A Tower [`Service`] that introduces a fixed delay before each request.
+#[derive(Debug, Clone)]
+pub struct Delay<S> {
+ inner: S,
+ delay: Duration,
+}
+
+/// A Tower [`Service`] that conditionally applies fixed delay based on a predicate.
+///
+/// Requests that match the predicate will have the delay applied;
+/// other requests pass through immediately.
+#[derive(Clone, Debug)]
+pub struct DelayWith<S, P> {
+ inner: Delay<S>,
+ predicate: P,
+}
+
+/// A Tower [`Service`] that applies jittered delay to requests.
+///
+/// This service wraps an inner service and introduces a random delay
+/// (within a configured range) before each request.
+#[derive(Clone, Debug)]
+pub struct JitterDelay<S> {
+ inner: S,
+ base: Duration,
+ pct: f64,
+}
+
+/// A Tower [`Service`] that conditionally applies jittered delay based on a predicate.
+///
+/// Requests that match the predicate will have a jittered delay applied;
+/// other requests pass through immediately.
+#[derive(Clone, Debug)]
+pub struct JitterDelayWith<S, P> {
+ inner: JitterDelay<S>,
+ predicate: P,
+}
+
+// ===== impl Delay =====
+
+impl<S> Delay<S> {
+ /// Create a new [`Delay`] service wrapping the given inner service
+ #[inline]
+ pub fn new(inner: S, delay: Duration) -> Self {
+ Delay { inner, delay }
+ }
+}
+
+impl<S, Request> Service<Request> for Delay<S>
+where
+ S: Service<Request>,
+ S::Error: Into<BoxError>,
+{
+ type Response = S::Response;
+ type Error = BoxError;
+ type Future = ResponseFuture<S::Future>;
+
+ #[inline]
+ fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ self.inner.poll_ready(cx).map_err(Into::into)
+ }
+
+ fn call(&mut self, req: Request) -> Self::Future {
+ let response = self.inner.call(req);
+ let sleep = tokio::time::sleep(self.delay);
+ ResponseFuture::new(response, sleep)
+ }
+}
+
+// ===== impl DelayWith =====
+
+impl<S, P> DelayWith<S, P> {
+ /// Creates a new [`DelayWith`].
+ #[inline]
+ pub fn new(inner: S, delay: Duration, predicate: P) -> Self {
+ Self {
+ inner: Delay::new(inner, delay),
+ predicate,
+ }
+ }
+}
+
+impl<S, Req, P> Service<Req> for DelayWith<S, P>
+where
+ S: Service<Req>,
+ S::Error: Into<BoxError>,
+ P: Fn(&Req) -> bool,
+{
+ type Response = S::Response;
+ type Error = BoxError;
+ type Future = ResponseFuture<S::Future>;
+
+ #[inline]
+ fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ self.inner.poll_ready(cx).map_err(Into::into)
+ }
+
+ fn call(&mut self, req: Req) -> Self::Future {
+ if !(self.predicate)(&req) {
+ self.inner.delay = Duration::ZERO;
+ }
+ self.inner.call(req)
+ }
+}
+
+// ===== impl JitterDelay =====
+
+impl<S> JitterDelay<S> {
+ /// Creates a new [`JitterDelay`].
+ #[inline]
+ pub fn new(inner: S, base: Duration, pct: f64) -> Self {
+ Self {
+ inner,
+ base,
+ pct: pct.clamp(0.0, 1.0),
+ }
+ }
+}
+
+impl<S, Req> Service<Req> for JitterDelay<S>
+where
+ S: Service<Req>,
+ S::Error: Into<BoxError>,
+{
+ type Response = S::Response;
+ type Error = BoxError;
+ type Future = ResponseFuture<S::Future>;
+
+ #[inline]
+ fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ self.inner.poll_ready(cx).map_err(Into::into)
+ }
+
+ fn call(&mut self, req: Req) -> Self::Future {
+ let delay = jittered_duration(self.base, self.pct);
+ let sleep = tokio::time::sleep(delay);
+ let fut = self.inner.call(req);
+ ResponseFuture::new(fut, sleep)
+ }
+}
+
+// ===== impl JitterDelayWith =====
+
+impl<S, P> JitterDelayWith<S, P> {
+ /// Creates a new [`JitterDelayWith`].
+ #[inline]
+ pub fn new(inner: S, base: Duration, pct: f64, predicate: P) -> Self {
+ Self {
+ inner: JitterDelay::new(inner, base, pct),
+ predicate,
+ }
+ }
+}
+
+impl<S, Req, P> Service<Req> for JitterDelayWith<S, P>
+where
+ S: Service<Req>,
+ S::Error: Into<BoxError>,
+ P: Fn(&Req) -> bool,
+{
+ type Response = S::Response;
+ type Error = BoxError;
+ type Future = ResponseFuture<S::Future>;
+
+ #[inline]
+ fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ self.inner.poll_ready(cx).map_err(Into::into)
+ }
+
+ fn call(&mut self, req: Req) -> Self::Future {
+ let delay = if (self.predicate)(&req) {
+ jittered_duration(self.inner.base, self.inner.pct)
+ } else {
+ Duration::ZERO
+ };
+
+ let sleep = tokio::time::sleep(delay);
+ let fut = self.inner.inner.call(req);
+ ResponseFuture::new(fut, sleep)
+ }
+}
diff --git a/vendor/wreq-util/tests/client.rs b/vendor/wreq-util/tests/client.rs
new file mode 100644
index 00000000..5af9ea54
--- /dev/null
+++ b/vendor/wreq-util/tests/client.rs
@@ -0,0 +1,51 @@
+#![cfg(not(target_arch = "wasm32"))]
+mod support;
+
+use support::server;
+use wreq::Client;
+use wreq_util::{Emulation, Platform};
+
+#[tokio::test]
+async fn test_client_emulation_device() {
+ let server = server::http(move |req| async move {
+ for (name, value) in req.headers() {
+ if name == "user-agent" {
+ assert_eq!(
+ value,
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
+ );
+ }
+ if name == "sec-ch-ua" {
+ assert_eq!(
+ value,
+ r#""Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133""#
+ );
+ }
+ if name == "sec-ch-ua-mobile" {
+ assert_eq!(value, "?0");
+ }
+ if name == "sec-ch-ua-platform" {
+ assert_eq!(value, "\"Linux\"");
+ }
+ }
+ http::Response::default()
+ });
+
+ let url = format!("http://{}/ua", server.addr());
+ let res = Client::builder()
+ .emulation(
+ Emulation::builder()
+ .profile(Emulation::Chrome133)
+ .platform(Platform::Linux)
+ .http2(true)
+ .build(),
+ )
+ .build()
+ .expect("Unable to build client")
+ .get(&url)
+ .send()
+ .await
+ .expect("request");
+
+ assert_eq!(res.status(), wreq::StatusCode::OK);
+}
diff --git a/vendor/wreq-util/tests/emulate_chrome.rs b/vendor/wreq-util/tests/emulate_chrome.rs
new file mode 100644
index 00000000..4484f638
--- /dev/null
+++ b/vendor/wreq-util/tests/emulate_chrome.rs
@@ -0,0 +1,270 @@
+#[macro_use]
+mod support;
+
+use wreq_util::Emulation;
+
+// Enabling certain extensions(ECH) will change the length during encryption. This is because TLS will
+// automatically use padding to fill the data and add a padding extension. At this time, the ja4
+// fingerprint will change.
+
+test_emulation!(
+ test_chrome100,
+ Emulation::Chrome100,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "4f04edce68a7ecbe689edce7bf5f23f3"
+);
+
+test_emulation!(
+ test_chrome101,
+ Emulation::Chrome101,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "4f04edce68a7ecbe689edce7bf5f23f3"
+);
+
+test_emulation!(
+ test_edge101,
+ Emulation::Edge101,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "4f04edce68a7ecbe689edce7bf5f23f3"
+);
+
+test_emulation!(
+ test_chrome104,
+ Emulation::Chrome104,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "4f04edce68a7ecbe689edce7bf5f23f3"
+);
+
+test_emulation!(
+ test_chrome105,
+ Emulation::Chrome105,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "4f04edce68a7ecbe689edce7bf5f23f3"
+);
+
+test_emulation!(
+ test_chrome106,
+ Emulation::Chrome106,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "a345a694846ad9f6c97bcc3c75adbe26"
+);
+
+test_emulation!(
+ test_chrome107,
+ Emulation::Chrome107,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "a345a694846ad9f6c97bcc3c75adbe26"
+);
+
+test_emulation!(
+ test_chrome108,
+ Emulation::Chrome108,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "a345a694846ad9f6c97bcc3c75adbe26"
+);
+
+test_emulation!(
+ test_chrome109,
+ Emulation::Chrome109,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "a345a694846ad9f6c97bcc3c75adbe26"
+);
+
+test_emulation!(
+ test_chrome110,
+ Emulation::Chrome110,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "4f04edce68a7ecbe689edce7bf5f23f3"
+);
+
+test_emulation!(
+ test_chrome114,
+ Emulation::Chrome114,
+ ["t13d1516h2_8daaf6152771_e5627efa2ab1"],
+ "a345a694846ad9f6c97bcc3c75adbe26"
+);
+
+test_emulation!(
+ test_chrome116,
+ Emulation::Chrome116,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "a345a694846ad9f6c97bcc3c75adbe26"
+);
+
+test_emulation!(
+ test_chrome117,
+ Emulation::Chrome117,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome118,
+ Emulation::Chrome118,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome119,
+ Emulation::Chrome119,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome120,
+ Emulation::Chrome120,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_edge122,
+ Emulation::Edge122,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome123,
+ Emulation::Chrome123,
+ [
+ "t13d1516h2_8daaf6152771_02713d6af862",
+ "t13d1517h2_8daaf6152771_b1ff8ab2d16f"
+ ],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome124,
+ Emulation::Chrome124,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome126,
+ Emulation::Chrome126,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome127,
+ Emulation::Chrome127,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_edge127,
+ Emulation::Edge127,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome128,
+ Emulation::Chrome128,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome129,
+ Emulation::Chrome129,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome130,
+ Emulation::Chrome130,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome131,
+ Emulation::Chrome131,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_edge131,
+ Emulation::Edge131,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome132,
+ Emulation::Chrome132,
+ ["t13d1516h2_8daaf6152771_d8a2da3f94cd"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome133,
+ Emulation::Chrome133,
+ ["t13d1516h2_8daaf6152771_d8a2da3f94cd"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome134,
+ Emulation::Chrome134,
+ ["t13d1516h2_8daaf6152771_d8a2da3f94cd"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_edge134,
+ Emulation::Edge134,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome135,
+ Emulation::Chrome135,
+ ["t13d1516h2_8daaf6152771_d8a2da3f94cd"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome136,
+ Emulation::Chrome136,
+ ["t13d1516h2_8daaf6152771_d8a2da3f94cd"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_chrome137,
+ Emulation::Chrome137,
+ ["t13d1516h2_8daaf6152771_d8a2da3f94cd"],
+ "52d84b11737d980aef856699f885ca86"
+);
diff --git a/vendor/wreq-util/tests/emulate_firefox.rs b/vendor/wreq-util/tests/emulate_firefox.rs
new file mode 100644
index 00000000..395bddf6
--- /dev/null
+++ b/vendor/wreq-util/tests/emulate_firefox.rs
@@ -0,0 +1,92 @@
+#[macro_use]
+mod support;
+
+use wreq_util::Emulation;
+
+// Enabling certain extensions(ECH) will change the length during encryption. This is because TLS will
+// automatically use padding to fill the data and add a padding extension. At this time, the ja4
+// fingerprint will change.
+
+test_emulation!(
+ test_firefox_109,
+ Emulation::Firefox109,
+ ["t13d1715h2_5b57614c22b0_3d5424432f57"],
+ "73d042072ceabaedacfd45e84dff1020"
+);
+
+test_emulation!(
+ test_firefox_117,
+ Emulation::Firefox117,
+ ["t13d1715h2_5b57614c22b0_3d5424432f57"],
+ "73d042072ceabaedacfd45e84dff1020"
+);
+
+test_emulation!(
+ test_firefox_128,
+ Emulation::Firefox128,
+ ["t13d1513h2_8daaf6152771_748f4c70de1c"],
+ "1d8a6f51fd7253d04674593073fc18b0"
+);
+
+test_emulation!(
+ test_firefox_133,
+ Emulation::Firefox133,
+ ["t13d1716h2_5b57614c22b0_eeeea6562960"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_135,
+ Emulation::Firefox135,
+ ["t13d1717h2_5b57614c22b0_3cbfd9057e0d"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_private_135,
+ Emulation::FirefoxPrivate135,
+ ["t13d1715h2_5b57614c22b0_a54fffd0eb61"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_android_135,
+ Emulation::FirefoxAndroid135,
+ ["t13d1716h2_5b57614c22b0_eeeea6562960"],
+ "41a06cadb1c6385e6d08c8d0dbbea818"
+);
+
+test_emulation!(
+ test_firefox_136,
+ Emulation::Firefox136,
+ ["t13d1717h2_5b57614c22b0_3cbfd9057e0d"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_private_136,
+ Emulation::FirefoxPrivate136,
+ ["t13d1715h2_5b57614c22b0_a54fffd0eb61"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_139,
+ Emulation::Firefox139,
+ ["t13d1717h2_5b57614c22b0_3cbfd9057e0d"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_142,
+ Emulation::Firefox142,
+ ["t13d1717h2_5b57614c22b0_3cbfd9057e0d"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
+
+test_emulation!(
+ test_firefox_143,
+ Emulation::Firefox143,
+ ["t13d1717h2_5b57614c22b0_3cbfd9057e0d"],
+ "6ea73faa8fc5aac76bded7bd238f6433"
+);
diff --git a/vendor/wreq-util/tests/emulate_okhttp.rs b/vendor/wreq-util/tests/emulate_okhttp.rs
new file mode 100644
index 00000000..052e6075
--- /dev/null
+++ b/vendor/wreq-util/tests/emulate_okhttp.rs
@@ -0,0 +1,46 @@
+#[macro_use]
+mod support;
+
+use wreq_util::Emulation;
+
+test_emulation!(
+ test_okhttp3_13,
+ Emulation::OkHttp3_13,
+ ["t13d1613h2_46e7e9700bed_eca864cca44a"],
+ "605a1154008045d7e3cb3c6fb062c0ce"
+);
+
+test_emulation!(
+ test_okhttp3_14,
+ Emulation::OkHttp3_14,
+ ["t13d1613h2_46e7e9700bed_eca864cca44a"],
+ "605a1154008045d7e3cb3c6fb062c0ce"
+);
+
+test_emulation!(
+ test_okhttp4_9,
+ Emulation::OkHttp4_9,
+ ["t13d1513h2_8daaf6152771_eca864cca44a"],
+ "605a1154008045d7e3cb3c6fb062c0ce"
+);
+
+test_emulation!(
+ test_okhttp4_10,
+ Emulation::OkHttp4_10,
+ ["t13d1613h2_46e7e9700bed_eca864cca44a"],
+ "605a1154008045d7e3cb3c6fb062c0ce"
+);
+
+test_emulation!(
+ test_okhttp4_12,
+ Emulation::OkHttp4_12,
+ ["t13d1613h2_46e7e9700bed_eca864cca44a"],
+ "605a1154008045d7e3cb3c6fb062c0ce"
+);
+
+test_emulation!(
+ test_okhttp5,
+ Emulation::OkHttp5,
+ ["t13d1613h2_46e7e9700bed_eca864cca44a"],
+ "605a1154008045d7e3cb3c6fb062c0ce"
+);
diff --git a/vendor/wreq-util/tests/emulate_opera.rs b/vendor/wreq-util/tests/emulate_opera.rs
new file mode 100644
index 00000000..3d8e3c28
--- /dev/null
+++ b/vendor/wreq-util/tests/emulate_opera.rs
@@ -0,0 +1,113 @@
+#[macro_use]
+mod support;
+
+use wreq_util::Emulation;
+
+// Enabling certain extensions will change the length during encryption. This is because TLS will
+// automatically use padding to fill the data and add a padding extension. At this time, the ja4
+// fingerprint will change.
+
+test_emulation!(
+ test_opera116,
+ Emulation::Opera116,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera117,
+ Emulation::Opera117,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera118,
+ Emulation::Opera118,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera119,
+ Emulation::Opera119,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera120,
+ Emulation::Opera120,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera121,
+ Emulation::Opera121,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera122,
+ Emulation::Opera122,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera123,
+ Emulation::Opera123,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera124,
+ Emulation::Opera124,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera125,
+ Emulation::Opera125,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera126,
+ Emulation::Opera126,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera127,
+ Emulation::Opera127,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera128,
+ Emulation::Opera128,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera129,
+ Emulation::Opera129,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
+
+test_emulation!(
+ test_opera130,
+ Emulation::Opera130,
+ ["t13d1516h2_8daaf6152771_02713d6af862"],
+ "52d84b11737d980aef856699f885ca86"
+);
diff --git a/vendor/wreq-util/tests/emulate_safari.rs b/vendor/wreq-util/tests/emulate_safari.rs
new file mode 100644
index 00000000..f6e559d7
--- /dev/null
+++ b/vendor/wreq-util/tests/emulate_safari.rs
@@ -0,0 +1,151 @@
+#[macro_use]
+mod support;
+
+use wreq_util::Emulation;
+
+test_emulation!(
+ test_safari_15_3,
+ Emulation::Safari15_3,
+ ["t13d2614h2_2802a3db6c62_14788d8d241b"],
+ "dda308d35f4e5db7b52a61720ca1b122"
+);
+
+test_emulation!(
+ test_safari_15_5,
+ Emulation::Safari15_5,
+ ["t13d2614h2_2802a3db6c62_14788d8d241b"],
+ "dda308d35f4e5db7b52a61720ca1b122"
+);
+
+test_emulation!(
+ test_safari_15_6_1,
+ Emulation::Safari15_6_1,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "dda308d35f4e5db7b52a61720ca1b122"
+);
+
+test_emulation!(
+ test_safari_16,
+ Emulation::Safari16,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "dda308d35f4e5db7b52a61720ca1b122"
+);
+
+test_emulation!(
+ test_safari_16_5,
+ Emulation::Safari16_5,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "dda308d35f4e5db7b52a61720ca1b122"
+);
+
+test_emulation!(
+ test_safari_ios_16_5,
+ Emulation::SafariIos16_5,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "d5fcbdc393757341115a861bf8d23265"
+);
+
+test_emulation!(
+ test_safari_17,
+ Emulation::Safari17_0,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "959a7e813b79b909a1a0b00a38e8bba3"
+);
+
+test_emulation!(
+ test_safari_17_2_1,
+ Emulation::Safari17_2_1,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "959a7e813b79b909a1a0b00a38e8bba3"
+);
+
+test_emulation!(
+ test_safari_17_4_1,
+ Emulation::Safari17_4_1,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "dda308d35f4e5db7b52a61720ca1b122"
+);
+
+test_emulation!(
+ test_safari_17_5,
+ Emulation::Safari17_5,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "959a7e813b79b909a1a0b00a38e8bba3"
+);
+
+test_emulation!(
+ test_safari_ios_17_2,
+ Emulation::SafariIos17_2,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "ad8424af1cc590e09f7b0c499bf7fcdb"
+);
+
+test_emulation!(
+ test_safari_ios_17_4_1,
+ Emulation::SafariIos17_4_1,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "ad8424af1cc590e09f7b0c499bf7fcdb"
+);
+
+test_emulation!(
+ test_safari_18,
+ Emulation::Safari18,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "d4a2dcbfde511b5040ed5a5190a8d78b"
+);
+
+test_emulation!(
+ test_safari_18_2,
+ Emulation::Safari18_2,
+ ["t13d2014h2_a09f3c656075_e42f34c56612"],
+ "d4a2dcbfde511b5040ed5a5190a8d78b"
+);
+
+test_emulation!(
+ test_safari_18_3,
+ Emulation::Safari18_3,
+ ["t13d2014h2_a09f3c656075_e42f34c56612"],
+ "d4a2dcbfde511b5040ed5a5190a8d78b"
+);
+
+test_emulation!(
+ test_safari_18_3_1,
+ Emulation::Safari18_3_1,
+ ["t13d2014h2_a09f3c656075_e42f34c56612"],
+ "d4a2dcbfde511b5040ed5a5190a8d78b"
+);
+
+test_emulation!(
+ test_safari_ios_18_1_1,
+ Emulation::SafariIos18_1_1,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "d4a2dcbfde511b5040ed5a5190a8d78b"
+);
+
+test_emulation!(
+ test_safari_ipad_18,
+ Emulation::SafariIPad18,
+ ["t13d2014h2_a09f3c656075_14788d8d241b"],
+ "d4a2dcbfde511b5040ed5a5190a8d78b"
+);
+
+test_emulation!(
+ test_safari_18_5,
+ Emulation::Safari18_5,
+ ["t13d2014h2_a09f3c656075_e42f34c56612"],
+ "c52879e43202aeb92740be6e8c86ea96"
+);
+
+test_emulation!(
+ test_safari_26,
+ Emulation::Safari26,
+ ["t13d2013h2_a09f3c656075_7f0f34a4126d"],
+ "c52879e43202aeb92740be6e8c86ea96"
+);
+
+test_emulation!(
+ test_safari_26_1,
+ Emulation::Safari26_1,
+ ["t13d2014h2_a09f3c656075_e42f34c56612"],
+ "773906b0efdefa24a7f2b8eb6985bf37"
+);
diff --git a/vendor/wreq-util/tests/support/mod.rs b/vendor/wreq-util/tests/support/mod.rs
new file mode 100644
index 00000000..96adad30
--- /dev/null
+++ b/vendor/wreq-util/tests/support/mod.rs
@@ -0,0 +1,55 @@
+#![allow(dead_code)]
+pub mod server;
+
+use std::{sync::LazyLock, time::Duration};
+
+use tokio::sync::Semaphore;
+use wreq::Client;
+
+// TODO: remove once done converting to new support server?
+#[allow(unused)]
+pub static DEFAULT_USER_AGENT: &str =
+ concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"));
+
+pub static TEST_SEMAPHORE: LazyLock<Semaphore> = LazyLock::new(|| Semaphore::new(1));
+
+pub static CLIENT: LazyLock<Client> = LazyLock::new(|| {
+ Client::builder()
+ .connect_timeout(Duration::from_secs(60))
+ .build()
+ .unwrap()
+});
+
+#[allow(unused_macros)]
+macro_rules! test_emulation {
+ ($test_name:ident, $emulation:expr, $ja4:expr, $akamai_hash:expr) => {
+ #[tokio::test]
+ async fn $test_name() {
+ let _permit = crate::support::TEST_SEMAPHORE.acquire().await.unwrap();
+
+ let resp = crate::support::CLIENT
+ .get("https://tls.browserleaks.com/")
+ .emulation($emulation)
+ .send()
+ .await
+ .unwrap();
+
+ assert_eq!(resp.status(), wreq::StatusCode::OK);
+ let content = resp.text().await.unwrap();
+
+ let conditional = $ja4.iter().any(|&ja4| content.contains(ja4));
+ if !conditional {
+ println!("{}", content);
+ }
+ assert!(conditional);
+
+ let conditional = content.contains($akamai_hash);
+ if !conditional {
+ println!("{}", content);
+ }
+ assert!(conditional);
+
+ tokio::time::sleep(std::time::Duration::from_millis(1000)).await;
+ }
+ };
+}
diff --git a/vendor/wreq-util/tests/support/server.rs b/vendor/wreq-util/tests/support/server.rs
new file mode 100644
index 00000000..8b190fd9
--- /dev/null
+++ b/vendor/wreq-util/tests/support/server.rs
@@ -0,0 +1,232 @@
+#![cfg(not(target_arch = "wasm32"))]
+use std::{
+ convert::Infallible, future::Future, net, sync::mpsc as std_mpsc, thread, time::Duration,
+};
+
+use tokio::{io::AsyncReadExt, net::TcpStream, runtime, sync::oneshot};
+
+pub struct Server {
+ addr: net::SocketAddr,
+ panic_rx: std_mpsc::Receiver<()>,
+ events_rx: std_mpsc::Receiver<Event>,
+ shutdown_tx: Option<oneshot::Sender<()>>,
+}
+
+#[non_exhaustive]
+pub enum Event {
+ ConnectionClosed,
+}
+
+impl Server {
+ pub fn addr(&self) -> net::SocketAddr {
+ self.addr
+ }
+
+ #[allow(unused)]
+ pub fn events(&mut self) -> Vec<Event> {
+ let mut events = Vec::new();
+ while let Ok(event) = self.events_rx.try_recv() {
+ events.push(event);
+ }
+ events
+ }
+}
+
+impl Drop for Server {
+ fn drop(&mut self) {
+ if let Some(tx) = self.shutdown_tx.take() {
+ let _ = tx.send(());
+ }
+
+ if !::std::thread::panicking() {
+ self.panic_rx
+ .recv_timeout(Duration::from_secs(3))
+ .expect("test server should not panic");
+ }
+ }
+}
+
+pub fn http<F, Fut>(func: F) -> Server
+where
+ F: Fn(http::Request<hyper::body::Incoming>) -> Fut + Clone + Send + 'static,
+ Fut: Future<Output = http::Response<wreq::Body>> + Send + 'static,
+{
+ http_with_config(func, |_builder| {})
+}
+
+type Builder = hyper_util::server::conn::auto::Builder<hyper_util::rt::TokioExecutor>;
+
+pub fn http_with_config<F1, Fut, F2, Bu>(func: F1, apply_config: F2) -> Server
+where
+ F1: Fn(http::Request<hyper::body::Incoming>) -> Fut + Clone + Send + 'static,
+ Fut: Future<Output = http::Response<wreq::Body>> + Send + 'static,
+ F2: FnOnce(&mut Builder) -> Bu + Send + 'static,
+{
+ // Spawn new runtime in thread to prevent reactor execution context conflict
+ let test_name = thread::current().name().unwrap_or("<unknown>").to_string();
+ thread::spawn(move || {
+ let rt = runtime::Builder::new_current_thread()
+ .enable_all()
+ .build()
+ .expect("new rt");
+ let listener = rt.block_on(async move {
+ tokio::net::TcpListener::bind(&std::net::SocketAddr::from(([127, 0, 0, 1], 0)))
+ .await
+ .unwrap()
+ });
+ let addr = listener.local_addr().unwrap();
+
+ let (shutdown_tx, mut shutdown_rx) = oneshot::channel();
+ let (panic_tx, panic_rx) = std_mpsc::channel();
+ let (events_tx, events_rx) = std_mpsc::channel();
+ let tname = format!(
+ "test({})-support-server",
+ test_name,
+ );
+ thread::Builder::new()
+ .name(tname)
+ .spawn(move || {
+ rt.block_on(async move {
+ let mut builder =
+ hyper_util::server::conn::auto::Builder::new(hyper_util::rt::TokioExecutor::new());
+ apply_config(&mut builder);
+
+ loop {
+ tokio::select! {
+ _ = &mut shutdown_rx => {
+ break;
+ }
+ accepted = listener.accept() => {
+ let (io, _) = accepted.expect("accepted");
+ let func = func.clone();
+ let svc = hyper::service::service_fn(move |req| {
+ let fut = func(req);
+ async move { Ok::<_, Infallible>(fut.await) }
+ });
+ let builder = builder.clone();
+ let events_tx = events_tx.clone();
+ tokio::spawn(async move {
+ let _ = builder.serve_connection_with_upgrades(hyper_util::rt::TokioIo::new(io), svc).await;
+ let _ = events_tx.send(Event::ConnectionClosed);
+ });
+ }
+ }
+ }
+ let _ = panic_tx.send(());
+ });
+ })
+ .expect("thread spawn");
+ Server {
+ addr,
+ panic_rx,
+ events_rx,
+ shutdown_tx: Some(shutdown_tx),
+ }
+ })
+ .join()
+ .unwrap()
+}
+
+#[allow(unused)]
+pub fn low_level_with_response<F>(do_response: F) -> Server
+where
+ for<'c> F: Fn(&'c [u8], &'c mut TcpStream) -> Box<dyn Future<Output = ()> + Send + 'c>
+ + Clone
+ + Send
+ + 'static,
+{
+ // Spawn new runtime in thread to prevent reactor execution context conflict
+ let test_name = thread::current().name().unwrap_or("<unknown>").to_string();
+ thread::spawn(move || {
+ let rt = runtime::Builder::new_current_thread()
+ .enable_all()
+ .build()
+ .expect("new rt");
+ let listener = rt.block_on(async move {
+ tokio::net::TcpListener::bind(&std::net::SocketAddr::from(([127, 0, 0, 1], 0)))
+ .await
+ .unwrap()
+ });
+ let addr = listener.local_addr().unwrap();
+
+ let (shutdown_tx, mut shutdown_rx) = oneshot::channel();
+ let (panic_tx, panic_rx) = std_mpsc::channel();
+ let (events_tx, events_rx) = std_mpsc::channel();
+ let tname = format!("test({})-support-server", test_name,);
+ thread::Builder::new()
+ .name(tname)
+ .spawn(move || {
+ rt.block_on(async move {
+ loop {
+ tokio::select! {
+ _ = &mut shutdown_rx => {
+ break;
+ }
+ accepted = listener.accept() => {
+ let (io, _) = accepted.expect("accepted");
+ let do_response = do_response.clone();
+ let events_tx = events_tx.clone();
+ tokio::spawn(async move {
+ low_level_server_client(io, do_response).await;
+ let _ = events_tx.send(Event::ConnectionClosed);
+ });
+ }
+ }
+ }
+ let _ = panic_tx.send(());
+ });
+ })
+ .expect("thread spawn");
+ Server {
+ addr,
+ panic_rx,
+ events_rx,
+ shutdown_tx: Some(shutdown_tx),
+ }
+ })
+ .join()
+ .unwrap()
+}
+
+#[allow(unused)]
+async fn low_level_server_client<F>(mut client_socket: TcpStream, do_response: F)
+where
+ for<'c> F: Fn(&'c [u8], &'c mut TcpStream) -> Box<dyn Future<Output = ()> + Send + 'c>,
+{
+ loop {
+ let request = low_level_read_http_request(&mut client_socket)
+ .await
+ .expect("read_http_request failed");
+ if request.is_empty() {
+ // connection closed by client
+ break;
+ }
+
+ Box::into_pin(do_response(&request, &mut client_socket)).await;
+ }
+}
+
+#[allow(unused)]
+async fn low_level_read_http_request(
+ client_socket: &mut TcpStream,
+) -> core::result::Result<Vec<u8>, std::io::Error> {
+ let mut buf = Vec::new();
+
+ // Read until the delimiter "\r\n\r\n" is found
+ loop {
+ let mut temp_buffer = [0; 1024];
+ let n = client_socket.read(&mut temp_buffer).await?;
+
+ if n == 0 {
+ break;
+ }
+
+ buf.extend_from_slice(&temp_buffer[..n]);
+
+ if let Some(pos) = buf.windows(4).position(|window| window == b"\r\n\r\n") {
+ return Ok(buf.drain(..pos + 4).collect());
+ }
+ }
+
+ Ok(buf)
+}