pub struct MitmProxyBuilder<H: InterceptHandler> { /* private fields */ }Expand description
Builder for constructing a MitmProxy instance.
Supply a validated MitmConfig and an InterceptHandler implementation,
optionally attach a pre-generated CertificateAuthority, then call
build to produce a ready-to-run proxy.
Implementations§
Source§impl<H: InterceptHandler> MitmProxyBuilder<H>
impl<H: InterceptHandler> MitmProxyBuilder<H>
Sourcepub fn new(config: MitmConfig, handler: H) -> Self
pub fn new(config: MitmConfig, handler: H) -> Self
Creates a new builder with the given configuration and handler.
Sourcepub fn with_ca(self, ca: CertificateAuthority) -> Self
pub fn with_ca(self, ca: CertificateAuthority) -> Self
Attaches a pre-generated CA for TLS interception.
If omitted, the proxy will load or generate a CA from the paths
specified in TlsConfig.
Auto Trait Implementations§
impl<H> Freeze for MitmProxyBuilder<H>where
H: Freeze,
impl<H> RefUnwindSafe for MitmProxyBuilder<H>where
H: RefUnwindSafe,
impl<H> Send for MitmProxyBuilder<H>
impl<H> Sync for MitmProxyBuilder<H>
impl<H> Unpin for MitmProxyBuilder<H>where
H: Unpin,
impl<H> UnsafeUnpin for MitmProxyBuilder<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for MitmProxyBuilder<H>where
H: UnwindSafe,
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