Skip to content

Commit

Permalink
Removed obsolete Edge99 impersonate support (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x676e67 authored Aug 12, 2024
1 parent 87219ca commit d40c754
Show file tree
Hide file tree
Showing 49 changed files with 6 additions and 67 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pub mod edge101;
pub mod edge122;
pub mod edge127;
pub mod edge99;

const CIPHER_LIST: [&str; 15] = [
"TLS_AES_128_GCM_SHA256",
Expand Down
7 changes: 2 additions & 5 deletions src/tls/profile/mod.rs → src/tls/impersonate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub fn tls_settings(ver: Impersonate, headers: &mut HeaderMap) -> TlsResult<SslB
OkHttp5 => okhttp::okhttp5::get_settings,

// Edge
Edge99 => edge::edge99::get_settings,
Edge101 => edge::edge101::get_settings,
Edge122 => edge::edge122::get_settings,
Edge127 => edge::edge127::get_settings
Expand Down Expand Up @@ -122,9 +121,8 @@ pub enum Impersonate {
OkHttp4_9,
OkHttp4_10,
OkHttp5,

// Edge
Edge99,
Edge101,
Edge122,
Edge127,
Expand Down Expand Up @@ -180,7 +178,6 @@ impl FromStr for Impersonate {
"okhttp_5" => Ok(OkHttp5),

// Edge
"edge_99" => Ok(Edge99),
"edge_101" => Ok(Edge101),
"edge_122" => Ok(Edge122),
"edge_127" => Ok(Edge127),
Expand Down Expand Up @@ -223,7 +220,7 @@ impl Impersonate {
}

// Edge
Edge99 | Edge101 | Edge122 | Edge127 => TypedImpersonate::Edge,
Edge101 | Edge122 | Edge127 => TypedImpersonate::Edge,
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/tls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
mod cert_compression;
pub mod connector;
pub mod extension;
mod profile;
mod impersonate;
mod settings;

use crate::connect::HttpConnector;
Expand All @@ -20,8 +20,8 @@ use boring::{
ssl::{ConnectConfiguration, SslConnectorBuilder},
};
use connector::{HttpsConnector, HttpsLayer, HttpsLayerSettings};
pub(crate) use profile::tls_settings;
pub use profile::{Impersonate, TypedImpersonate};
pub(crate) use impersonate::tls_settings;
pub use impersonate::{Impersonate, TypedImpersonate};
pub use settings::{
Http2Settings, ImpersonateSettings, SslBuilderSettings, SslContextSettings, SslSettings,
};
Expand Down
56 changes: 0 additions & 56 deletions src/tls/profile/edge/edge99.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/tls/settings.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::{
profile::{Impersonate, TypedImpersonate},
impersonate::{Impersonate, TypedImpersonate},
Version,
};
use crate::async_impl::client::HttpVersionPref;
Expand Down
1 change: 0 additions & 1 deletion tests/badssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ async fn test_badssl_modern() {
#[tokio::test]
async fn test_badssl_self_signed() {
let text = rquest::Client::builder()
.impersonate(rquest::tls::OkHttp4_9)
.danger_accept_invalid_certs(true)
.no_proxy()
.build()
Expand Down

0 comments on commit d40c754

Please sign in to comment.