Skip to main content

ClientHello

Struct ClientHello 

Source
pub struct ClientHello<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ClientHello<'a>

Source

pub fn random() -> ClientHello<'a>

Source

pub fn from_bytes( ht: HandshakeType, bytes: &'a [u8], ) -> Result<ClientHello<'a>, RlsError>

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn write_to<W>(self, writer: &mut W)
where W: WriteExt,

Source

pub fn client_random(&mut self) -> &ByteRef<'a>

Source

pub fn ja3(&self) -> String

§ja3计算方式为

version+‘,’+cipher_suite(u16)+‘,’+extend_type(u16)+‘,’+supported_groud值(u16)+‘,’+ec_point_format(u8) tls1.3中移除了ec_point_format

Source

pub fn ja4(&self) -> String

§ja4计算方式为

‘t’+version+‘d’+len(cipher_suites)+len(extensions)+alpn+‘_’+cipher_suite(u16)+‘,’+ec_point_format(u8) tls1.3中移除了ec_point_format

Source

pub fn set_random(&mut self, random: &'a [u8])

Source

pub fn set_session_id(&mut self, session_id: &'a [u8])

Source

pub fn set_server_name(&mut self, server_name: &str)

Source

pub fn set_version(&mut self, version: Version)

Source

pub fn set_cipher_suites(&mut self, suites: Vec<CipherSuite>)

Source

pub fn set_extension(&mut self, extension: Vec<Extension>)

Source

pub fn server_name(&self) -> Option<&str>

Source

pub fn alps(&self) -> Option<&ALPS>

Source

pub fn remove_h2_alpn(&mut self)

Source

pub fn remove_tls13(&mut self)

Source

pub fn add_h2_alpn(&mut self)

Source

pub fn cipher_suites(&self) -> &Vec<CipherSuite>

Source

pub fn take_extensions(&mut self) -> Vec<Extension>

Trait Implementations§

Source§

impl<'a> Debug for ClientHello<'a>

Source§

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

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

impl<'a> Default for ClientHello<'a>

Source§

fn default() -> ClientHello<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ClientHello<'a>

§

impl<'a> RefUnwindSafe for ClientHello<'a>

§

impl<'a> Send for ClientHello<'a>

§

impl<'a> Sync for ClientHello<'a>

§

impl<'a> Unpin for ClientHello<'a>

§

impl<'a> UnsafeUnpin for ClientHello<'a>

§

impl<'a> UnwindSafe for ClientHello<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.