mirror of
https://github.com/DNSCrypt/doh-server.git
synced 2025-04-03 04:57:37 +03:00
Update deps; fix for new tokio
This commit is contained in:
parent
b544ca3daa
commit
226d8fe52a
3 changed files with 5 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -11,7 +11,6 @@ use tokio_rustls::{
|
|||
rustls::{internal::pemfile, NoClientAuth, ServerConfig},
|
||||
TlsAcceptor,
|
||||
};
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
|
||||
pub fn create_tls_acceptor<P, P2>(certs_path: P, certs_keys_path: P2) -> io::Result<TlsAcceptor>
|
||||
where
|
||||
|
@ -82,7 +81,7 @@ impl DoH {
|
|||
pub async fn start_with_tls(
|
||||
self,
|
||||
tls_acceptor: TlsAcceptor,
|
||||
mut listener: TcpListener,
|
||||
listener: TcpListener,
|
||||
server: Http<LocalExecutor>,
|
||||
) -> Result<(), DoHError> {
|
||||
let listener_service = async {
|
||||
|
|
|
@ -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")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue