pub struct NetworkProxyState { /* private fields */ }Implementations§
Source§impl NetworkProxyState
impl NetworkProxyState
pub fn with_reloader( state: ConfigState, reloader: Arc<dyn ConfigReloader>, ) -> Self
pub fn with_reloader_and_blocked_observer( state: ConfigState, reloader: Arc<dyn ConfigReloader>, blocked_request_observer: Option<Arc<dyn BlockedRequestObserver>>, ) -> Self
pub fn with_reloader_and_audit_metadata( state: ConfigState, reloader: Arc<dyn ConfigReloader>, audit_metadata: NetworkProxyAuditMetadata, ) -> Self
pub fn with_reloader_and_audit_metadata_and_blocked_observer( state: ConfigState, reloader: Arc<dyn ConfigReloader>, audit_metadata: NetworkProxyAuditMetadata, blocked_request_observer: Option<Arc<dyn BlockedRequestObserver>>, ) -> Self
pub async fn set_blocked_request_observer( &self, blocked_request_observer: Option<Arc<dyn BlockedRequestObserver>>, )
pub fn audit_metadata(&self) -> &NetworkProxyAuditMetadata
pub fn set_header_transformer(&mut self, t: Arc<dyn RequestHeaderTransformer>)
pub fn header_transformer(&self) -> Option<&Arc<dyn RequestHeaderTransformer>>
pub async fn current_cfg(&self) -> Result<NetworkProxyConfig>
pub async fn current_patterns(&self) -> Result<(Vec<String>, Vec<String>)>
pub async fn enabled(&self) -> Result<bool>
pub async fn force_reload(&self) -> Result<()>
pub async fn replace_config_state(&self, new_state: ConfigState) -> Result<()>
pub async fn host_blocked( &self, host: &str, port: u16, ) -> Result<HostBlockDecision>
pub async fn record_blocked(&self, entry: BlockedRequest) -> Result<()>
Sourcepub async fn blocked_snapshot(&self) -> Result<Vec<BlockedRequest>>
pub async fn blocked_snapshot(&self) -> Result<Vec<BlockedRequest>>
Returns a snapshot of buffered blocked-request entries without consuming them.
Sourcepub async fn drain_blocked(&self) -> Result<Vec<BlockedRequest>>
pub async fn drain_blocked(&self) -> Result<Vec<BlockedRequest>>
Drain and return the buffered blocked-request entries in FIFO order.
pub async fn is_unix_socket_allowed(&self, path: &str) -> Result<bool>
pub async fn method_allowed(&self, method: &str) -> Result<bool>
pub async fn allow_upstream_proxy(&self) -> Result<bool>
pub async fn network_mode(&self) -> Result<NetworkMode>
pub async fn set_network_mode(&self, mode: NetworkMode) -> Result<()>
pub async fn mitm_state(&self) -> Result<Option<Arc<MitmState>>>
pub async fn add_allowed_domain(&self, host: &str) -> Result<()>
pub async fn add_denied_domain(&self, host: &str) -> Result<()>
Trait Implementations§
Source§impl Clone for NetworkProxyState
impl Clone for NetworkProxyState
Auto Trait Implementations§
impl Freeze for NetworkProxyState
impl !RefUnwindSafe for NetworkProxyState
impl Send for NetworkProxyState
impl Sync for NetworkProxyState
impl Unpin for NetworkProxyState
impl UnsafeUnpin for NetworkProxyState
impl !UnwindSafe for NetworkProxyState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more