[−][src]Trait async_proxy::proxy::ProxyConstructor
A general trait that represents something that constructs a proxy stream, something, where we can write to and read from just as from a usual stream but through a proxy
Associated Types
type Stream: Send
Represents a stream that the proxy client operates on (sends protocol data over it)
type ProxyStream: Send
Represents the actual proxy stream, returned by the connect function
type ErrorKind
Used for internal proxy error indication
Required methods
#[must_use]fn connect<'async_trait>(
self,
stream: Self::Stream
) -> Pin<Box<dyn Future<Output = Result<Self::ProxyStream, Self::ErrorKind>> + Send + 'async_trait>> where
Self: Sized,
Self: 'async_trait,
self,
stream: Self::Stream
) -> Pin<Box<dyn Future<Output = Result<Self::ProxyStream, Self::ErrorKind>> + Send + 'async_trait>> where
Self: Sized,
Self: 'async_trait,
Takes ownership of an existant stream, establishes a proxixied connection on the stream and returns the proxy stream if the connection was successful, unless an error
Implementors
impl ProxyConstructor for Socks4General
[src]
type ProxyStream = S4GeneralStream
type Stream = TcpStream
type ErrorKind = ErrorKind
fn connect<'async_trait>(
self,
stream: Self::Stream
) -> Pin<Box<dyn Future<Output = Result<Self::ProxyStream, Self::ErrorKind>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self,
stream: Self::Stream
) -> Pin<Box<dyn Future<Output = Result<Self::ProxyStream, Self::ErrorKind>> + Send + 'async_trait>> where
Self: 'async_trait,
impl ProxyConstructor for Socks4NoIdent
[src]
type ProxyStream = S4NoIdentStream
type Stream = TcpStream
type ErrorKind = ErrorKind
fn connect<'async_trait>(
self,
stream: Self::Stream
) -> Pin<Box<dyn Future<Output = Result<Self::ProxyStream, Self::ErrorKind>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self,
stream: Self::Stream
) -> Pin<Box<dyn Future<Output = Result<Self::ProxyStream, Self::ErrorKind>> + Send + 'async_trait>> where
Self: 'async_trait,