pub struct MitmProxy<H: InterceptHandler> { /* private fields */ }Expand description
The intercepting proxy instance, ready to run or start as a background task.
Constructed via MitmProxyBuilder.
Implementations§
Source§impl<H: InterceptHandler> MitmProxy<H>
impl<H: InterceptHandler> MitmProxy<H>
Sourcepub async fn run(self) -> Result<(), MitmError>
pub async fn run(self) -> Result<(), MitmError>
Runs the proxy, blocking until it shuts down or encounters a fatal error.
Sourcepub async fn start(self) -> Result<MitmProxyHandle, MitmError>
pub async fn start(self) -> Result<MitmProxyHandle, MitmError>
Starts the proxy as a background task and returns a handle for shutdown and metrics.
Sourcepub async fn start_with_listener(
self,
listener: TcpListener,
) -> Result<MitmProxyHandle, MitmError>
pub async fn start_with_listener( self, listener: TcpListener, ) -> Result<MitmProxyHandle, MitmError>
Like [start] but uses a pre-bound TCP listener inherited from a
supervisor process, enabling zero-downtime restarts.
Auto Trait Implementations§
impl<H> Freeze for MitmProxy<H>
impl<H> RefUnwindSafe for MitmProxy<H>where
H: RefUnwindSafe,
impl<H> Send for MitmProxy<H>
impl<H> Sync for MitmProxy<H>
impl<H> Unpin for MitmProxy<H>
impl<H> UnsafeUnpin for MitmProxy<H>
impl<H> UnwindSafe for MitmProxy<H>where
H: RefUnwindSafe,
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