pub struct TlsBuilder { /* private fields */ }Expand description
Fluent builder for TlsConfig.
Implementations§
Source§impl TlsBuilder
impl TlsBuilder
Sourcepub fn bypass(self, pattern: impl Into<String>) -> Self
pub fn bypass(self, pattern: impl Into<String>) -> Self
Add a domain to the bypass list (no MITM). Supports *.suffix wildcards.
Sourcepub fn verify_upstream(self, verify: bool) -> Self
pub fn verify_upstream(self, verify: bool) -> Self
Enable or disable upstream server certificate verification.
Sourcepub fn intercepted_ports(self, ports: Vec<u16>) -> Self
pub fn intercepted_ports(self, ports: Vec<u16>) -> Self
Set the ports to intercept.
Sourcepub fn block_quic(self, block: bool) -> Self
pub fn block_quic(self, block: bool) -> Self
Enable or disable QUIC blocking on intercepted ports.
Sourcepub fn upstream_ca_cert(self, path: impl Into<PathBuf>) -> Self
pub fn upstream_ca_cert(self, path: impl Into<PathBuf>) -> Self
Add a CA certificate PEM file to trust for upstream server verification.
Useful when the upstream server uses a self-signed or private CA certificate. Can be called multiple times to add several CAs.
Sourcepub fn intercept_ca_cert(self, path: impl Into<PathBuf>) -> Self
pub fn intercept_ca_cert(self, path: impl Into<PathBuf>) -> Self
Set a custom interception CA certificate PEM file path.
Sourcepub fn intercept_ca_key(self, path: impl Into<PathBuf>) -> Self
pub fn intercept_ca_key(self, path: impl Into<PathBuf>) -> Self
Set a custom interception CA private key PEM file path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TlsBuilder
impl RefUnwindSafe for TlsBuilder
impl Send for TlsBuilder
impl Sync for TlsBuilder
impl Unpin for TlsBuilder
impl UnsafeUnpin for TlsBuilder
impl UnwindSafe for TlsBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more