pub struct HttpsProxy { /* private fields */ }Implementations§
Source§impl HttpsProxy
impl HttpsProxy
Sourcepub fn with_client_config(config: Arc<ClientConfig>) -> Self
pub fn with_client_config(config: Arc<ClientConfig>) -> Self
The only way to construct a HttpsProxy as a TLS configuration is required for HTTP CONNECT proxies.
This implementation is based on rustls
Sourcepub async fn tunnel(
&self,
dest: Uri,
proxy_server: SocketAddrV4,
auth: Option<Auth>,
) -> Result<TlsStream<TcpStream>>
pub async fn tunnel( &self, dest: Uri, proxy_server: SocketAddrV4, auth: Option<Auth>, ) -> Result<TlsStream<TcpStream>>
Opens a tunnel via proxy server to target.
auth should be auth::Auth::HTTPAuthorizationHeader or None when no authentication is required, when given it will be set on Authorization header in initial handshake request to proxy server
Implementation is based on: HTTP CONNECT and has TLS support via rustls
Subtly different, crate::http::tunnel is an implementation based on IP Proxy
Auto Trait Implementations§
impl !RefUnwindSafe for HttpsProxy
impl !UnwindSafe for HttpsProxy
impl Freeze for HttpsProxy
impl Send for HttpsProxy
impl Sync for HttpsProxy
impl Unpin for HttpsProxy
impl UnsafeUnpin for HttpsProxy
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
Mutably borrows from an owned value. Read more