pub struct HttpClientConfig {
pub proxy: Option<String>,
pub insecure_tls: bool,
pub timeout: Option<Duration>,
pub ua_suffix: Option<String>,
}Expand description
Single source of truth for outbound HTTP policy.
Fields§
§proxy: Option<String>Explicit proxy URL. Overrides env-var detection. Accepts
http://, https://, socks5:// schemes (forwarded to
reqwest unchanged). The literal string "off" disables
proxying entirely - including env-var inheritance.
insecure_tls: boolAccept invalid / self-signed TLS certs (Burp CA, mitmproxy CA). Off by default.
timeout: Option<Duration>Optional per-request timeout override. None falls back to
the 30-second default below.
ua_suffix: Option<String>User-Agent suffix appended after keyhog/<version>. Lets a
per-source caller add its own identifier (e.g. web,
github-org) without forcing every site to spell out the full
version string.
Implementations§
Source§impl HttpClientConfig
impl HttpClientConfig
Sourcepub fn effective_proxy(&self) -> Option<String>
pub fn effective_proxy(&self) -> Option<String>
Resolve proxy from env vars when no explicit value was set.
Returns Some("off") if the operator disabled proxying.
Sourcepub fn effective_insecure_tls(&self) -> bool
pub fn effective_insecure_tls(&self) -> bool
Resolve insecure-TLS from env when not set explicitly.
Trait Implementations§
Source§impl Clone for HttpClientConfig
impl Clone for HttpClientConfig
Source§fn clone(&self) -> HttpClientConfig
fn clone(&self) -> HttpClientConfig
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 HttpClientConfig
impl Debug for HttpClientConfig
Source§impl Default for HttpClientConfig
impl Default for HttpClientConfig
Source§fn default() -> HttpClientConfig
fn default() -> HttpClientConfig
Auto Trait Implementations§
impl Freeze for HttpClientConfig
impl RefUnwindSafe for HttpClientConfig
impl Send for HttpClientConfig
impl Sync for HttpClientConfig
impl Unpin for HttpClientConfig
impl UnsafeUnpin for HttpClientConfig
impl UnwindSafe for HttpClientConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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