diff --git a/tuic-client/Cargo.toml b/tuic-client/Cargo.toml index 34a3c06..a47cddc 100644 --- a/tuic-client/Cargo.toml +++ b/tuic-client/Cargo.toml @@ -12,20 +12,19 @@ lexopt = { version = "0.3.0", default-features = false } log = { version = "0.4.17", default-features = false, features = ["serde", "std"] } once_cell = { version = "1.17.1", default-features = false, features = ["parking_lot", "std"] } parking_lot = { version = "0.12.1", default-features = false, features = ["send_guard"] } -quinn = { version = "0.9.3", default-features = false, features = ["futures-io", "runtime-tokio", "tls-rustls"] } +quinn = { version = "0.10.0", default-features = false, features = ["futures-io", "runtime-tokio", "tls-rustls"] } register-count = { version = "0.1.0", default-features = false, features = ["std"] } -rustls = { version = "0.20.8", default-features = false, features = ["quic"] } +rustls = { version = "0.21.1", default-features = false, features = ["quic"] } rustls-native-certs = { version = "0.6.2", default-features = false } rustls-pemfile = { version = "1.0.2", default-features = false } -serde = { version = "1.0.152", default-features = false, features = ["derive", "std"] } -serde_json = { version = "1.0.94", default-features = false, features = ["std"] } -socket2 = { version = "0.5.1", default-features = false } +serde = { version = "1.0.163", default-features = false, features = ["derive", "std"] } +serde_json = { version = "1.0.96", default-features = false, features = ["std"] } +socket2 = { version = "0.5.2", default-features = false } socks5-proto = { version = "0.3.3", default-features = false } socks5-server = { version = "0.8.3", default-features = false } -thiserror = { version = "1.0.39", default-features = false } -tokio = { version = "1.26.0", default-features = false, features = ["io-util", "macros", "net", "parking_lot", "rt-multi-thread", "time"] } -tokio-util = { version = "0.7.7", default-features = false, features = ["compat"] } +thiserror = { version = "1.0.40", default-features = false } +tokio = { version = "1.28.1", default-features = false, features = ["io-util", "macros", "net", "parking_lot", "rt-multi-thread", "time"] } +tokio-util = { version = "0.7.8", default-features = false, features = ["compat"] } tuic = { path = "../tuic", default-features = false } tuic-quinn = { path = "../tuic-quinn", default-features = false } -uuid = { version = "1.3.0", default-features = false, features = ["serde", "std"] } -webpki = { version = "0.22.0", default-features = false } +uuid = { version = "1.3.2", default-features = false, features = ["serde", "std"] } diff --git a/tuic-client/src/connection.rs b/tuic-client/src/connection.rs index d21d370..84cc4da 100644 --- a/tuic-client/src/connection.rs +++ b/tuic-client/src/connection.rs @@ -89,7 +89,12 @@ impl Endpoint { config.transport_config(Arc::new(tp_cfg)); let socket = UdpSocket::bind(SocketAddr::from(([0, 0, 0, 0], 0)))?; - let mut ep = QuinnEndpoint::new(EndpointConfig::default(), None, socket, TokioRuntime)?; + let mut ep = QuinnEndpoint::new( + EndpointConfig::default(), + None, + socket, + Arc::new(TokioRuntime), + )?; ep.set_default_client_config(config); let ep = Self { diff --git a/tuic-client/src/main.rs b/tuic-client/src/main.rs index b863d3a..b429fd8 100644 --- a/tuic-client/src/main.rs +++ b/tuic-client/src/main.rs @@ -5,10 +5,10 @@ use self::{ }; use env_logger::Builder as LoggerBuilder; use quinn::{ConnectError, ConnectionError}; +use rustls::Error as RustlsError; use std::{env, io::Error as IoError, process}; use thiserror::Error; use tuic_quinn::Error as ModelError; -use webpki::Error as WebpkiError; mod config; mod connection; @@ -65,7 +65,7 @@ pub enum Error { #[error(transparent)] Model(#[from] ModelError), #[error(transparent)] - Webpki(#[from] WebpkiError), + Rustls(#[from] RustlsError), #[error("timeout establishing connection")] Timeout, #[error("cannot resolve the server name")] diff --git a/tuic-quinn/Cargo.toml b/tuic-quinn/Cargo.toml index fa66ea1..6448aeb 100644 --- a/tuic-quinn/Cargo.toml +++ b/tuic-quinn/Cargo.toml @@ -13,8 +13,8 @@ repository = "https://github.com/EAimTY/tuic" [dependencies] bytes = { version = "1.4.0", default-features = false, features = ["std"] } -futures-util = { version = "0.3.26", default-features = false, features = ["io", "std"] } -quinn = { version = "0.9.3", default-features = false, features = ["futures-io"] } -thiserror = { version = "1.0.39", default-features = false } +futures-util = { version = "0.3.28", default-features = false, features = ["io", "std"] } +quinn = { version = "0.10.0", default-features = false, features = ["futures-io"] } +thiserror = { version = "1.0.40", default-features = false } tuic = { path = "../tuic", default-features = false, features = ["async_marshal", "marshal", "model"] } -uuid = { version = "1.3.0", default-features = false, features = ["std"] } +uuid = { version = "1.3.2", default-features = false, features = ["std"] } diff --git a/tuic-server/Cargo.toml b/tuic-server/Cargo.toml index dc96788..4773dfb 100644 --- a/tuic-server/Cargo.toml +++ b/tuic-server/Cargo.toml @@ -11,16 +11,16 @@ humantime = { version = "2.1.0", default-features = false } lexopt = { version = "0.3.0", default-features = false } log = { version = "0.4.17", default-features = false, features = ["serde", "std"] } parking_lot = { version = "0.12.1", default-features = false } -quinn = { version = "0.9.3", default-features = false, features = ["futures-io", "runtime-tokio", "tls-rustls"] } +quinn = { version = "0.10.0", default-features = false, features = ["futures-io", "runtime-tokio", "tls-rustls"] } register-count = { version = "0.1.0", default-features = false, features = ["std"] } -rustls = { version = "0.20.8", default-features = false, features = ["quic"] } +rustls = { version = "0.21.1", default-features = false, features = ["quic"] } rustls-pemfile = { version = "1.0.2", default-features = false } -serde = { version = "1.0.152", default-features = false, features = ["derive", "std"] } -serde_json = { version = "1.0.94", default-features = false, features = ["std"] } -socket2 = { version = "0.5.1", default-features = false } -thiserror = { version = "1.0.39", default-features = false } -tokio = { version = "1.26.0", default-features = false, features = ["io-util", "macros", "net", "parking_lot", "rt-multi-thread", "time"] } -tokio-util = { version = "0.7.7", default-features = false, features = ["compat"] } +serde = { version = "1.0.163", default-features = false, features = ["derive", "std"] } +serde_json = { version = "1.0.96", default-features = false, features = ["std"] } +socket2 = { version = "0.5.2", default-features = false } +thiserror = { version = "1.0.40", default-features = false } +tokio = { version = "1.28.1", default-features = false, features = ["io-util", "macros", "net", "parking_lot", "rt-multi-thread", "time"] } +tokio-util = { version = "0.7.8", default-features = false, features = ["compat"] } tuic = { path = "../tuic", default-features = false } tuic-quinn = { path = "../tuic-quinn", default-features = false } -uuid = { version = "1.3.0", default-features = false, features = ["serde", "std"] } +uuid = { version = "1.3.2", default-features = false, features = ["serde", "std"] } diff --git a/tuic-server/src/server.rs b/tuic-server/src/server.rs index b6c3204..ea68d51 100644 --- a/tuic-server/src/server.rs +++ b/tuic-server/src/server.rs @@ -113,7 +113,7 @@ impl Server { EndpointConfig::default(), Some(config), socket, - TokioRuntime, + Arc::new(TokioRuntime), )?; let users = cfg diff --git a/tuic/Cargo.toml b/tuic/Cargo.toml index a827af4..10e05e8 100644 --- a/tuic/Cargo.toml +++ b/tuic/Cargo.toml @@ -18,11 +18,11 @@ model = ["parking_lot", "register-count", "thiserror"] [dependencies] bytes = { version = "1.4.0", default-features = false, features = ["std"], optional = true } -futures-util = { version = "0.3.26", default-features = false, features = ["io", "std"], optional = true } +futures-util = { version = "0.3.28", default-features = false, features = ["io", "std"], optional = true } parking_lot = { version = "0.12.1", default-features = false, optional = true } register-count = { version = "0.1.0", default-features = false, features = ["std"], optional = true } -thiserror = { version = "1.0.39", default-features = false, optional = true } -uuid = { version = "1.3.0", default-features = false, features = ["std"] } +thiserror = { version = "1.0.40", default-features = false, optional = true } +uuid = { version = "1.3.2", default-features = false, features = ["std"] } [dev-dependencies] tuic = { path = ".", features = ["async_marshal", "marshal", "model"] }