pub struct MitmProxy<C> {
pub root_cert: Option<C>,
pub cert_cache: Option<Cache<String, CertifiedKeyDer>>,
}Expand description
The main struct to run proxy server
Fields§
§root_cert: Option<C>Root certificate to sign fake certificates. You may need to trust this certificate on client application to use HTTPS.
If None, proxy will just tunnel HTTPS traffic and will not observe HTTPS traffic.
cert_cache: Option<Cache<String, CertifiedKeyDer>>Cache to store generated certificates. If None, cache will not be used. If root_cert is None, cache will not be used.
The key of cache is hostname.
Implementations§
Source§impl<C: Borrow<CertifiedKey> + Send + Sync + 'static> MitmProxy<C>
impl<C: Borrow<CertifiedKey> + Send + Sync + 'static> MitmProxy<C>
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for MitmProxy<C>where
C: Freeze,
impl<C> !RefUnwindSafe for MitmProxy<C>
impl<C> Send for MitmProxy<C>where
C: Send,
impl<C> Sync for MitmProxy<C>where
C: Sync,
impl<C> Unpin for MitmProxy<C>where
C: Unpin,
impl<C> !UnwindSafe for MitmProxy<C>
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)