Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Firefox135 support #444

Merged
merged 2 commits into from
Feb 17, 2025
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
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

> 🚀 Help me work seamlessly with open source sharing by [sponsoring me on GitHub](https://github.com/0x676e67/0x676e67/blob/main/SPONSOR.md)

An ergonomic, all-in-one HTTP client for spoofing any browser with `TLS`, `JA3`/`JA4`, and `HTTP2` fingerprints.
An ergonomic, all-in-one HTTP client for spoofing any browser with TLS, JA3/JA4, and HTTP2 fingerprints.

- <ins>This project is intended for personal learning purposes only. Use at your own risk❕</ins>

## Features

Expand Down Expand Up @@ -98,23 +100,23 @@ By default, `rquest` uses Mozilla's root certificates through the `webpki-roots`

- **Chrome**

`Chrome100``Chrome101``Chrome104``Chrome105``Chrome106``Chrome107``Chrome108``Chrome109``Chrome114``Chrome116``Chrome117``Chrome118``Chrome119``Chrome120``Chrome123``Chrome124``Chrome126``Chrome127``Chrome128``Chrome129``Chrome130``Chrome131`
`Chrome100`, `Chrome101`, `Chrome104`, `Chrome105`, `Chrome106`, `Chrome107`, `Chrome108`, `Chrome109`, `Chrome114`, `Chrome116`, `Chrome117`, `Chrome118`, `Chrome119`, `Chrome120`, `Chrome123`, `Chrome124`, `Chrome126`, `Chrome127`, `Chrome128`, `Chrome129`, `Chrome130`, `Chrome131`,, `Chrome133`

- **Edge**

`Edge101``Edge122``Edge127``Edge131`
`Edge101`, `Edge122`, `Edge127`, `Edge131`

- **Safari**

`SafariIos17_2``SafariIos17_4_1``SafariIos16_5``Safari15_3``Safari15_5``Safari15_6_1``Safari16``Safari16_5``Safari17_0``Safari17_2_1``Safari17_4_1``Safari17_5``Safari18``SafariIPad18`, `Safari18_2`, `Safari18_1_1`
`SafariIos17_2`, `SafariIos17_4_1`, `SafariIos16_5`, `Safari15_3`, `Safari15_5`, `Safari15_6_1`, `Safari16`, `Safari16_5`, `Safari17_0`, `Safari17_2_1`, `Safari17_4_1`, `Safari17_5`, `Safari18`, `SafariIPad18`, `Safari18_2`, `Safari18_1_1`

- **OkHttp**

`OkHttp3_9``OkHttp3_11``OkHttp3_13``OkHttp3_14``OkHttp4_9``OkHttp4_10``OkHttp5`
`OkHttp3_9`, `OkHttp3_11`, `OkHttp3_13`, `OkHttp3_14`, `OkHttp4_9`, `OkHttp4_10`, `OkHttp5`

- **Firefox**

`Firefox109`, `Firefox117`, `Firefox128`, `Firefox133`
`Firefox109`, `Firefox117`, `Firefox128`, `Firefox133`, `Firefox135`

</details>

Expand Down
44 changes: 42 additions & 2 deletions src/imp/firefox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ macro_rules! tls_settings {
.key_shares_limit(2)
.build()
};
(4, $cipher_list:expr, $curves:expr) => {
FirefoxTlsSettings::builder()
.cipher_list($cipher_list)
.curves($curves)
.enable_ech_grease(true)
.enable_signed_cert_timestamps(true)
.session_ticket(false)
.pre_shared_key(true)
.psk_skip_session_tickets(true)
.key_shares_limit(3)
.psk_dhe_ke(false)
.cert_compression_algorithm(CERT_COMPRESSION_ALGORITHM)
.build()
};
}

macro_rules! http2_settings {
Expand Down Expand Up @@ -239,6 +253,7 @@ mod tls {
ExtensionType::APPLICATION_LAYER_PROTOCOL_NEGOTIATION,
ExtensionType::STATUS_REQUEST,
ExtensionType::DELEGATED_CREDENTIAL,
ExtensionType::CERTIFICATE_TIMESTAMP,
ExtensionType::KEY_SHARE,
ExtensionType::SUPPORTED_VERSIONS,
ExtensionType::SIGNATURE_ALGORITHMS,
Expand Down Expand Up @@ -277,6 +292,9 @@ mod tls {
#[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,

Expand Down Expand Up @@ -313,6 +331,7 @@ mod tls {
.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_protos(AlpnProtos::All)
.min_tls_version(TlsVersion::TLS_1_2)
.max_tls_version(TlsVersion::TLS_1_3)
Expand Down Expand Up @@ -429,7 +448,7 @@ mod_generator!(
http2_settings!(3),
header_initializer_with_zstd,
[
(MacOs,
(MacOS,
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0"
),
(Windows,
Expand All @@ -453,7 +472,7 @@ mod_generator!(
http2_settings!(1),
header_initializer_with_zstd,
[
(MacOs,
(MacOS,
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0"
),
(Android,
Expand All @@ -470,3 +489,24 @@ mod_generator!(
)
]
);

mod_generator!(
ff135,
tls_settings!(4, CIPHER_LIST_1, CURVES_2),
http2_settings!(1),
header_initializer_with_zstd,
[
(
MacOS,
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/135.0"
),
(
Windows,
"Mozilla/5.0 (Windows NT 10.0; rv:133.0) Gecko/20100101 Firefox/135.0"
),
(
Linux,
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/135.0"
)
]
);
4 changes: 3 additions & 1 deletion src/imp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ impl ImpersonateBuilder {
Firefox109 => ff109::settings,
Firefox117 => ff117::settings,
Firefox128 => ff128::settings,
Firefox133 => ff133::settings
Firefox133 => ff133::settings,
Firefox135 => ff135::settings
)
}
}
Expand Down Expand Up @@ -277,6 +278,7 @@ pub enum Impersonate {
Firefox117,
Firefox128,
Firefox133,
Firefox135,
}

/// ======== Impersonate impls ========
Expand Down
Loading