diff --git a/src/libdoh/Cargo.toml b/src/libdoh/Cargo.toml index 62e69d1..d81f9cf 100644 --- a/src/libdoh/Cargo.toml +++ b/src/libdoh/Cargo.toml @@ -19,9 +19,9 @@ anyhow = "1.0.36" byteorder = "1.3.4" base64 = "0.13.0" futures = "0.3.8" -hyper = { version = "0.14.1", default-features = false, features = ["server", "http1", "http2", "stream"] } +hyper = { version = "0.14.2", default-features = false, features = ["server", "http1", "http2", "stream"] } tokio = { version = "1.0.0", features = ["full"] } -tokio-rustls = { version = "0.21.1", optional = true } +tokio-rustls = { version = "0.22.0", optional = true } [profile.release] codegen-units = 1 diff --git a/src/libdoh/src/tls.rs b/src/libdoh/src/tls.rs index 85beebf..c239636 100644 --- a/src/libdoh/src/tls.rs +++ b/src/libdoh/src/tls.rs @@ -11,7 +11,6 @@ use tokio_rustls::{ rustls::{internal::pemfile, NoClientAuth, ServerConfig}, TlsAcceptor, }; -use tokio::io::{AsyncReadExt, AsyncWriteExt}; pub fn create_tls_acceptor(certs_path: P, certs_keys_path: P2) -> io::Result where @@ -82,7 +81,7 @@ impl DoH { pub async fn start_with_tls( self, tls_acceptor: TlsAcceptor, - mut listener: TcpListener, + listener: TcpListener, server: Http, ) -> Result<(), DoHError> { let listener_service = async { diff --git a/src/main.rs b/src/main.rs index efbf144..39fc8ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,11 +18,10 @@ use std::sync::Arc; use std::time::Duration; fn main() { - let mut runtime_builder = tokio::runtime::Builder::new(); + let mut runtime_builder = tokio::runtime::Builder::new_multi_thread(); runtime_builder.enable_all(); - runtime_builder.threaded_scheduler(); runtime_builder.thread_name("doh-proxy"); - let mut runtime = runtime_builder.build().unwrap(); + let runtime = runtime_builder.build().unwrap(); let mut globals = Globals { #[cfg(feature = "tls")]