Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Most browser device models share identical TLS and HTTP/2 configurations, differ

| **Browser** | **Versions** |
| ----------- | ------------ |
| **Chrome** | `Chrome100`, `Chrome101`, `Chrome104`, `Chrome105`, `Chrome106`, `Chrome107`, `Chrome108`, `Chrome109`, `Chrome110`, `Chrome114`, `Chrome116`, `Chrome117`, `Chrome118`, `Chrome119`, `Chrome120`, `Chrome123`, `Chrome124`, `Chrome126`, `Chrome127`, `Chrome128`, `Chrome129`, `Chrome130`, `Chrome131`, `Chrome132`, `Chrome133`, `Chrome134`, `Chrome135`, `Chrome136`, `Chrome137`, `Chrome138`, `Chrome139`, `Chrome140`, `Chrome141`, `Chrome142`, `Chrome143`, `Chrome144`, `Chrome145`, `Chrome146`, `Chrome147`, `Chrome148`, `Chrome149`, `Chrome150`, `Chrome151`, `Chrome152`, `Chrome153`, `Chrome154`, `Chrome155`, `Chrome156`, `Chrome157` |
| **Chrome** | `Chrome100`, `Chrome101`, `Chrome104`, `Chrome105`, `Chrome106`, `Chrome107`, `Chrome108`, `Chrome109`, `Chrome110`, `Chrome114`, `Chrome116`, `Chrome117`, `Chrome118`, `Chrome119`, `Chrome120`, `Chrome123`, `Chrome124`, `Chrome126`, `Chrome127`, `Chrome128`, `Chrome129`, `Chrome130`, `Chrome131`, `Chrome132`, `Chrome133`, `Chrome134`, `Chrome135`, `Chrome136`, `Chrome137`, `Chrome138`, `Chrome139`, `Chrome140`, `Chrome141`, `Chrome142`, `Chrome143`, `Chrome144`, `Chrome145`, `Chrome146`, `Chrome147`, `Chrome148`, `Chrome149`, `Chrome150`, `Chrome151`, `Chrome152`, `Chrome153`, `Chrome154`, `Chrome155`, `Chrome156`, `Chrome157`, `Chrome158` |
| **Edge** | `Edge101`, `Edge122`, `Edge127`, `Edge131`, `Edge134`, `Edge135`, `Edge136`, `Edge137`, `Edge138`, `Edge139`, `Edge140`, `Edge141`, `Edge142`, `Edge143`, `Edge144`, `Edge145`, `Edge146`, `Edge147`, `Edge148` |
| **Firefox** | `Firefox109`, `Firefox117`, `Firefox128`, `Firefox133`, `Firefox135`, `FirefoxPrivate135`, `FirefoxAndroid135`, `Firefox136`, `FirefoxPrivate136`, `Firefox139`, `Firefox142`, `Firefox143`, `Firefox144`, `Firefox145`, `Firefox146`, `Firefox147`, `Firefox148`, `Firefox149`, `Firefox150`, `Firefox151`, `Firefox152` |
| **Safari** | `Safari15_3`, `Safari15_5`, `Safari15_6_1`, `Safari16`, `Safari16_5`, `Safari17_0`, `Safari17_2_1`, `Safari17_4_1`, `Safari17_5`, `Safari17_6`, `Safari18`, `Safari18_2`, `Safari18_3`, `Safari18_3_1`, `Safari18_5`, `Safari26`, `Safari26_1`, `Safari26_2`, `SafariIos16_5`, `SafariIos17_2`, `SafariIos17_4_1`, `SafariIos18_1_1`, `SafariIos26`, `SafariIos26_2`, `SafariIPad18`, `SafariIPad26`, `SafariIpad26_2` |
Expand Down
5 changes: 5 additions & 0 deletions crates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Local Rust dependencies

- [`wreq-util`](wreq-util/) is a local copy of [0x676e67/wreq-util](https://github.com/0x676e67/wreq-util). The root [`Cargo.toml`](../Cargo.toml) resolves it from `crates/wreq-util` through `[patch.crates-io]`.

When building or testing `wreq-util` on its own, use the Git dependency patches from the root manifest of the same branch. Cargo does not inherit those patches from the parent package.
1 change: 1 addition & 0 deletions crates/wreq-util/src/emulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ define_enum!(
Chrome155 => ("chrome_155", v155::emulation),
Chrome156 => ("chrome_156", v156::emulation),
Chrome157 => ("chrome_157", v157::emulation),
Chrome158 => ("chrome_158", v158::emulation),

// Edge versions
Edge101 => ("edge_101", edge101::emulation),
Expand Down
35 changes: 35 additions & 0 deletions crates/wreq-util/src/emulate/profile/chrome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,41 @@ mod_generator!(
]
);

// Chrome 158 retains the Chrome 157 TLS, HTTP/2 and Accept presets.
// https://chromium.googlesource.com/chromium/src/+/b8c2be851f62f6a394ec57955d7f31335d7cb6d4/components/embedder_support/user_agent_utils.cc
mod_generator!(
v158,
v154::build_emulation,
header_initializer_chrome155,
[
(
MacOS,
r#""Chromium";v="158", "Not.A/Brand";v="24", "Google Chrome";v="158""#,
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Safari/537.36"
),
(
Linux,
r#""Chromium";v="158", "Not.A/Brand";v="24", "Google Chrome";v="158""#,
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Safari/537.36"
),
(
Android,
r#""Chromium";v="158", "Not.A/Brand";v="24", "Google Chrome";v="158""#,
"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Mobile Safari/537.36"
),
(
Windows,
r#""Chromium";v="158", "Not.A/Brand";v="24", "Google Chrome";v="158""#,
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Safari/537.36"
),
(
IOS,
r#""Chromium";v="158", "Not.A/Brand";v="24", "Google Chrome";v="158""#,
"Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/158.0.8127.35 Mobile/15E148 Safari/604.1"
)
]
);

mod_generator!(
edge143,
v132::build_emulation,
Expand Down
10 changes: 10 additions & 0 deletions crates/wreq-util/tests/emulate_chrome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,13 @@ test_emulation!(
],
"52d84b11737d980aef856699f885ca86"
);

test_emulation!(
test_chrome158,
Emulation::Chrome158,
[
"t13d1517h2_8daaf6152771_cb7bf5808d99",
"t13d1518h2_8daaf6152771_e2d80978ab2e"
],
"52d84b11737d980aef856699f885ca86"
);
1 change: 1 addition & 0 deletions lib/wreq_ruby/emulate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class Profile
Chrome155 = nil
Chrome156 = nil
Chrome157 = nil
Chrome158 = nil

Edge101 = nil
Edge122 = nil
Expand Down
6 changes: 1 addition & 5 deletions src/emulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ define_ruby_enum!(
Chrome155,
Chrome156,
Chrome157,

Chrome158,
Edge101,
Edge122,
Edge127,
Expand All @@ -115,7 +115,6 @@ define_ruby_enum!(
Edge146,
Edge147,
Edge148,

Firefox109,
Firefox117,
Firefox128,
Expand All @@ -137,7 +136,6 @@ define_ruby_enum!(
Firefox150,
Firefox151,
Firefox152,

SafariIos17_2,
SafariIos17_4_1,
SafariIos16_5,
Expand Down Expand Up @@ -167,7 +165,6 @@ define_ruby_enum!(
SafariIos26_2,
SafariIPad26,
SafariIpad26_2,

OkHttp3_9,
OkHttp3_11,
OkHttp3_13,
Expand All @@ -176,7 +173,6 @@ define_ruby_enum!(
OkHttp4_10,
OkHttp4_12,
OkHttp5,

Opera116,
Opera117,
Opera118,
Expand Down
1 change: 1 addition & 0 deletions test/emulation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def test_new_browser_profiles_are_available
Wreq::Profile::Chrome155 => "Chrome155",
Wreq::Profile::Chrome156 => "Chrome156",
Wreq::Profile::Chrome157 => "Chrome157",
Wreq::Profile::Chrome158 => "Chrome158",
Wreq::Profile::Firefox152 => "Firefox152"
}.each do |profile, name|
assert_equal name, profile.to_s
Expand Down
Loading