pub struct TlsFingerprintConfig {
pub tls12_cipher_list: String,
pub tls13_cipher_suites: String,
pub curves_list: String,
pub sigalgs_list: String,
}Expand description
Pre-computed BoringSSL configuration strings derived from a TlsFingerprint.
This is an intermediate representation that bridges bao_stealth::TlsFingerprint
(IANA u16 IDs) to bun_http::ssl_config::SSLConfig (C string pointers for
BoringSSL API calls). Created once per profile, then used to populate
SSLConfig fields before TLS handshake.
Usage:
use bao_stealth::{TlsFingerprint, TlsFingerprintConfig};
// Pick a browser TLS fingerprint (Firefox/Chrome), then derive the
// BoringSSL configuration strings (cipher lists / curves / sigalgs).
let fp = TlsFingerprint::firefox();
let config = TlsFingerprintConfig::from_fingerprint(&fp);
// The derived config carries non-empty OpenSSL/BoringSSL name strings.
assert!(config.has_fingerprint());
assert!(!config.tls12_cipher_list.is_empty());
assert!(!config.tls13_cipher_suites.is_empty());
assert!(!config.curves_list.is_empty());
assert!(!config.sigalgs_list.is_empty());
// Then in bao_runtime, write config.tls12_cipher_list into SSLConfig.Fields§
§tls12_cipher_list: StringTLS 1.2 cipher list in OpenSSL format (colon-separated). e.g. “ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256”
tls13_cipher_suites: StringTLS 1.3 cipher suites (colon-separated). e.g. “TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256”
curves_list: StringSupported groups/curves (colon-separated). e.g. “X25519:P-256:P-384”
sigalgs_list: StringSignature algorithms (colon-separated). e.g. “ecdsa_secp256r1_sha256:rsa_pss_rsae_sha256”
Implementations§
Source§impl TlsFingerprintConfig
impl TlsFingerprintConfig
Sourcepub fn from_fingerprint(fp: &TlsFingerprint) -> TlsFingerprintConfig
pub fn from_fingerprint(fp: &TlsFingerprint) -> TlsFingerprintConfig
Build from a TlsFingerprint by converting IANA u16 IDs to BoringSSL
OpenSSL name strings.
Sourcepub fn has_fingerprint(&self) -> bool
pub fn has_fingerprint(&self) -> bool
Whether any TLS fingerprint fields are non-empty.
Trait Implementations§
Source§impl Clone for TlsFingerprintConfig
impl Clone for TlsFingerprintConfig
Source§fn clone(&self) -> TlsFingerprintConfig
fn clone(&self) -> TlsFingerprintConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TlsFingerprintConfig
impl RefUnwindSafe for TlsFingerprintConfig
impl Send for TlsFingerprintConfig
impl Sync for TlsFingerprintConfig
impl Unpin for TlsFingerprintConfig
impl UnsafeUnpin for TlsFingerprintConfig
impl UnwindSafe for TlsFingerprintConfig
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more