MCPcopy Create free account
hub / github.com/Recordscript/recordscript / https_connect

Method https_connect

libs/hbb_common/src/proxy.rs:432–446  ·  view source on GitHub ↗
(
        self,
        io: Input,
        target: T,
    )

Source from the content-addressed store, hash-verified

430
431 #[cfg(any(target_os = "windows", target_os = "macos"))]
432 pub async fn https_connect<'a, Input, T>(
433 self,
434 io: Input,
435 target: T,
436 ) -> Result<BufStream<TlsStream<Input>>, ProxyError>
437 where
438 Input: AsyncRead + AsyncWrite + Unpin,
439 T: IntoTargetAddr<'a>,
440 {
441 let tls_connector = TlsConnector::from(native_tls::TlsConnector::new()?);
442 let stream = tls_connector
443 .connect(&self.intercept.get_domain()?, io)
444 .await?;
445 self.http_connect(stream, target).await
446 }
447
448 #[cfg(not(any(target_os = "windows", target_os = "macos")))]
449 pub async fn https_connect<'a, Input, T>(

Callers 1

connectMethod · 0.80

Calls 5

get_domainMethod · 0.80
http_connectMethod · 0.80
as_strMethod · 0.80
to_stringMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected