pub struct ProxyEntry { /* private fields */ }Expand description
A single validated proxy endpoint.
raw carries the full URL (including any user:pass) for reqwest, which
honours embedded credentials. chrome_proxy_server is the scheme-qualified
host:port without credentials, suitable for Chrome’s
Target.createBrowserContext { proxyServer } (Chrome takes creds via the
Fetch.authRequired auth pump, not in the URL).
Implementations§
Source§impl ProxyEntry
impl ProxyEntry
Sourcepub fn parse(raw: &str) -> Result<Self, String>
pub fn parse(raw: &str) -> Result<Self, String>
Parse and validate a proxy URL. Returns an error string (no silent fallback) when the scheme is unsupported or the host is missing.
Sourcepub fn chrome_proxy_server(&self) -> &str
pub fn chrome_proxy_server(&self) -> &str
Scheme-qualified host:port (no credentials) for Chrome proxyServer.
Sourcepub fn auth(&self) -> Option<&(String, String)>
pub fn auth(&self) -> Option<&(String, String)>
Optional (username, password) for the CDP auth pump.
Sourcepub fn supports_cdp_auth(&self) -> bool
pub fn supports_cdp_auth(&self) -> bool
Whether this proxy can authenticate on the Chrome/CDP path. Chrome’s
network stack never emits Fetch.authRequired for SOCKS proxies, so a
socks5/socks5h proxy that carries credentials cannot authenticate via
the CDP auth pump (it would hang/fail). HTTP/HTTPS proxies and
credential-less SOCKS proxies are fine. The HTTP (reqwest) path is
unaffected — it authenticates SOCKS natively via Self::raw.
Trait Implementations§
Source§impl Clone for ProxyEntry
impl Clone for ProxyEntry
Source§fn clone(&self) -> ProxyEntry
fn clone(&self) -> ProxyEntry
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 ProxyEntry
impl Debug for ProxyEntry
impl Eq for ProxyEntry
Source§impl PartialEq for ProxyEntry
impl PartialEq for ProxyEntry
Source§fn eq(&self, other: &ProxyEntry) -> bool
fn eq(&self, other: &ProxyEntry) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProxyEntry
Auto Trait Implementations§
impl Freeze for ProxyEntry
impl RefUnwindSafe for ProxyEntry
impl Send for ProxyEntry
impl Sync for ProxyEntry
impl Unpin for ProxyEntry
impl UnsafeUnpin for ProxyEntry
impl UnwindSafe for ProxyEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.