use hyper-tls and hyper-trust-dns as http(s) clients

This commit is contained in:
Jun Kurihara 2022-06-16 20:01:26 -04:00
commit 8fff4f4088
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
4 changed files with 138 additions and 80 deletions

View file

@ -5,7 +5,7 @@ use std::sync::Arc;
use std::time::Duration;
use futures::{future::FutureExt, join, select};
use hyper::server::conn::Http;
use hyper::{client::connect::Connect, server::conn::Http};
use tokio::{
net::TcpListener,
sync::mpsc::{self, Receiver},
@ -109,7 +109,10 @@ where
Ok(TlsAcceptor::from(Arc::new(server_config)))
}
impl PacketAcceptor {
impl<T> PacketAcceptor<T>
where
T: Connect + Clone + Send + Sync + 'static,
{
async fn start_https_service(
self,
mut tls_acceptor_receiver: Receiver<TlsAcceptor>,