Skip to main content

TlsProfile

Struct TlsProfile 

Source
pub struct TlsProfile {
Show 15 fields pub min_version: TlsVersion, pub max_version: TlsVersion, pub cipher_list: &'static str, pub curves: &'static [u16], pub grease_enabled: bool, pub permute_extensions: bool, pub enable_ech_grease: bool, pub alps_enabled: bool, pub alps_use_new_codepoint: bool, pub alps_extra_settings: &'static [(u16, u32)], pub compress_certificate: bool, pub session_ticket_enabled: bool, pub alpn_protocols: &'static [&'static [u8]], pub sigalgs: &'static [u16], pub verify_peer: bool,
}
Expand description

Configuration for the TLS 1.2/1.3 handshake layer.

This structure defines the Layer 4 identity of the client. Small changes here (such as the order of cipher suites) will change the JA3/JA4 fingerprint and can lead to immediate detection.

Fields§

§min_version: TlsVersion

Minimum allowed TLS version (typically TLS 1.2).

§max_version: TlsVersion

Maximum allowed TLS version (typically TLS 1.3).

§cipher_list: &'static str

Colon-separated list of cipher suites in OpenSSL format.

Precision in the order of this list is critical as it directly impacts the JA3/JA4 fingerprint.

§curves: &'static [u16]

Numeric IDs for supported elliptic curve groups.

§grease_enabled: bool

Whether to enable TLS GREASE (RFC 8701) to simulate randomized extensions.

§permute_extensions: bool

Whether to permute (shuffle) TLS extensions per connection.

§enable_ech_grease: bool

Whether to send a dummy ECH (Encrypted Client Hello) extension for GREASE.

§alps_enabled: bool

Whether to enable ALPS (Application-Layer Protocol Settings).

§alps_use_new_codepoint: bool

Whether to use the draft-01 or final ALPS codepoint.

§alps_extra_settings: &'static [(u16, u32)]

Additional H2 SETTINGS IDs to append in the ALPS payload.

Windows and Linux Chrome include an extra setting (ID 31386) in the ALPS handshake data that macOS omits. Each tuple is (id, value).

§compress_certificate: bool

Whether to support RFC 8879 certificate compression (Brotli).

§session_ticket_enabled: bool

Whether to enable stateless session tickets for fast reconnection.

§alpn_protocols: &'static [&'static [u8]]

Ordered list of ALPN protocol identifiers.

§sigalgs: &'static [u16]

Ordered list of signature algorithm IDs (used for JA4_r).

§verify_peer: bool

Whether to verify the server’s certificate chain.

Real browsers always verify certificates. Disable only for testing or local proxy interception.

Trait Implementations§

Source§

impl Clone for TlsProfile

Source§

fn clone(&self) -> TlsProfile

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TlsProfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TlsProfile

Source§

fn eq(&self, other: &TlsProfile) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for TlsProfile

Source§

impl Eq for TlsProfile

Source§

impl StructuralPartialEq for TlsProfile

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more