pub struct ProxyServer { /* private fields */ }Expand description
A bounded, authenticated, domain-filtering HTTP CONNECT proxy.
Implementations§
Source§impl ProxyServer
impl ProxyServer
pub async fn bind( allowlist: DomainAllowlist, shutdown_rx: Receiver<bool>, ) -> Result<(Self, ProxyEndpoint), ProxyError>
pub async fn bind_with_config( allowlist: DomainAllowlist, shutdown_rx: Receiver<bool>, config: ProxyConfig, ) -> Result<(Self, ProxyEndpoint), ProxyError>
Sourcepub async fn run(self) -> Result<(), ProxyError>
pub async fn run(self) -> Result<(), ProxyError>
Run until shutdown and keep every connection task inside this lifecycle.
Auto Trait Implementations§
impl !Freeze for ProxyServer
impl RefUnwindSafe for ProxyServer
impl Send for ProxyServer
impl Sync for ProxyServer
impl Unpin for ProxyServer
impl UnsafeUnpin for ProxyServer
impl UnwindSafe for ProxyServer
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