diff --git a/clash_lib/Cargo.toml b/clash_lib/Cargo.toml index 92dfdb26a..85169c6d8 100644 --- a/clash_lib/Cargo.toml +++ b/clash_lib/Cargo.toml @@ -22,7 +22,6 @@ async-trait = "0.1" hyper = { version = "1", features = ["http1","http2","client", "server"] } hyper-util = "0.1" - # Network proto http = { version = "1" } http-body-util = "0.1.2" diff --git a/clash_lib/src/proxy/tuic/handle_task.rs b/clash_lib/src/proxy/tuic/handle_task.rs index 72d323349..15370daab 100644 --- a/clash_lib/src/proxy/tuic/handle_task.rs +++ b/clash_lib/src/proxy/tuic/handle_task.rs @@ -159,7 +159,7 @@ impl TuicConnection { Ok(()) => Ok(()), Err(err) => { tracing::warn!("[udp] [dissociate] [{assoc_id:#06x}] {err}"); - Err(err)? + Err(anyhow::anyhow!(err)) } } } diff --git a/clash_lib/src/proxy/tuic/mod.rs b/clash_lib/src/proxy/tuic/mod.rs index 9bde6f3a5..3902d1c3f 100644 --- a/clash_lib/src/proxy/tuic/mod.rs +++ b/clash_lib/src/proxy/tuic/mod.rs @@ -23,7 +23,6 @@ use std::{ time::Duration, }; -use tokio_util::compat::FuturesAsyncReadCompatExt; use uuid::Uuid; use crate::{ @@ -283,7 +282,7 @@ impl Handler { ) -> Result { let conn = self.get_conn(&resolver, sess).await?; let dest = sess.destination.clone().into_tuic(); - let tuic_tcp = conn.connect_tcp(dest).await?.compat(); + let tuic_tcp = conn.connect_tcp(dest).await?; let s = ChainedStreamWrapper::new(tuic_tcp); s.append_to_chain(self.name()).await; Ok(Box::new(s))