(
self,
io: Input,
target: T,
)
| 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>( |
no test coverage detected