pub struct Proxy {
pub proxy_type: ProxyType,
pub host: String,
pub port: u16,
pub username: Option<String>,
pub password: Option<String>,
}Expand description
Proxy configuration for an outgoing HTTP / WebSocket request.
Proxy is a value type with no Arc<RwLock> wrapping — exactly like
hyperlane-core’s plain fields. Construct one with the convenience
constructors below, then pass to RequestBuilder::proxy(...) or assign
directly to RequestConfig::proxy.
§Examples
ⓘ
use http_request::Proxy;
let p = Proxy::https("proxy.example.com", 7890);
let auth = Proxy::socks5("127.0.0.1", 1080).auth("user", "pass");Fields§
§proxy_type: ProxyTypeProxy protocol family.
host: StringProxy server hostname or IP.
port: u16Proxy server port.
username: Option<String>Optional username for proxy auth.
password: Option<String>Optional password for proxy auth.
Implementations§
Trait Implementations§
impl Eq for Proxy
impl StructuralPartialEq for Proxy
Auto Trait Implementations§
impl Freeze for Proxy
impl RefUnwindSafe for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl UnsafeUnpin for Proxy
impl UnwindSafe for Proxy
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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