Enum hyper_socks2::Proxy
source · pub enum Proxy<T: ToSocketAddrs> {
Socks4 {
addrs: T,
user_id: String,
},
Socks5 {
addrs: T,
auth: Option<Auth>,
},
}Expand description
A SOCKS4/5 proxy information and TCP connector
Variants
Implementations
sourceimpl<T> Proxy<T>where
T: ToSocketAddrs,
impl<T> Proxy<T>where
T: ToSocketAddrs,
sourcepub fn with_tls(self) -> Result<HttpsConnector<Self>, Error>
pub fn with_tls(self) -> Result<HttpsConnector<Self>, Error>
Create a new connector with TLS support
Trait Implementations
sourceimpl<T: Clone + ToSocketAddrs> Clone for Proxy<T>
impl<T: Clone + ToSocketAddrs> Clone for Proxy<T>
sourceimpl<T> Connect for Proxy<T>where
T: ToSocketAddrs + Send + Sync,
impl<T> Connect for Proxy<T>where
T: ToSocketAddrs + Send + Sync,
type Future = Connection
type Future = Connection
A Future that will resolve to the connected Transport.
sourcefn connect(&self, dst: Destination) -> Self::Future
fn connect(&self, dst: Destination) -> Self::Future
Connect to a destination.
Auto Trait Implementations
impl<T> RefUnwindSafe for Proxy<T>where
T: RefUnwindSafe,
impl<T> Send for Proxy<T>where
T: Send,
impl<T> Sync for Proxy<T>where
T: Sync,
impl<T> Unpin for Proxy<T>where
T: Unpin,
impl<T> UnwindSafe for Proxy<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more