pub struct ProxyPolicy {Show 18 fields
pub strict_http_semantics: bool,
pub allow_fallback_method: bool,
pub allow_fallback_status: bool,
pub enable_retry: bool,
pub retry_idempotent_only: bool,
pub max_retries: u8,
pub sandbox_root: Option<PathBuf>,
pub max_local_file_bytes: usize,
pub max_body_size: usize,
pub request_timeout_ms: u64,
pub transparent_enabled: bool,
pub transparent_require_original_dst: bool,
pub transparent_allow_host_fallback: bool,
pub transparent_reject_loopback_target: bool,
pub transparent_log_level: TransparentLogLevel,
pub quic_mode: QuicMode,
pub quic_downgrade_clear_cache: bool,
pub redaction: RedactionPolicy,
}Fields§
§strict_http_semantics: boolIn strict mode, invalid method/status does not silently rewrite to GET/200.
allow_fallback_method: boolAllow fallback to GET for invalid methods (only if strict_http_semantics is false)
allow_fallback_status: boolAllow fallback to 200 OK for invalid status (only if strict_http_semantics is false)
enable_retry: boolEnable automatic retries for idempotent requests
retry_idempotent_only: boolOnly retry idempotent methods (GET, HEAD, OPTIONS)
max_retries: u8Maximum number of retries
sandbox_root: Option<PathBuf>Root directory for local file access (sandbox)
max_local_file_bytes: usizeMaximum allowed size for local file read
max_body_size: usizeMaximum allowed request/response body size for proxy inspection
request_timeout_ms: u64Request timeout in milliseconds (connect + send request + receive response headers)
transparent_enabled: boolEnable transparent proxy mode
transparent_require_original_dst: boolRequire original destination to be present (strict mode)
transparent_allow_host_fallback: boolAllow fallback to Host header when original destination is missing
transparent_reject_loopback_target: boolReject connections that would create a loop
transparent_log_level: TransparentLogLevelLog level for transparent proxy events
quic_mode: QuicModeQUIC handling mode
quic_downgrade_clear_cache: boolOptionally emit Clear-Site-Data: “cache” to invalidate client Alt-Svc cache
redaction: RedactionPolicyImplementations§
Source§impl ProxyPolicy
impl ProxyPolicy
pub fn apply_patch(&mut self, patch: ProxyPolicyPatch)
Trait Implementations§
Source§impl Clone for ProxyPolicy
impl Clone for ProxyPolicy
Source§fn clone(&self) -> ProxyPolicy
fn clone(&self) -> ProxyPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProxyPolicy
impl Debug for ProxyPolicy
Source§impl Default for ProxyPolicy
impl Default for ProxyPolicy
Source§fn default() -> ProxyPolicy
fn default() -> ProxyPolicy
Source§impl<'de> Deserialize<'de> for ProxyPolicy
impl<'de> Deserialize<'de> for ProxyPolicy
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProxyPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProxyPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ProxyPolicy
impl Serialize for ProxyPolicy
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ProxyPolicy
impl RefUnwindSafe for ProxyPolicy
impl Send for ProxyPolicy
impl Sync for ProxyPolicy
impl Unpin for ProxyPolicy
impl UnsafeUnpin for ProxyPolicy
impl UnwindSafe for ProxyPolicy
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
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>
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>
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