diff --git a/tuic-client/src/connection/handle_stream.rs b/tuic-client/src/connection/handle_stream.rs index 10da01c..6d7a594 100644 --- a/tuic-client/src/connection/handle_stream.rs +++ b/tuic-client/src/connection/handle_stream.rs @@ -52,13 +52,6 @@ impl Connection { Err(err) => Err(Error::Model(err)), Ok(Task::Packet(pkt)) => match self.udp_relay_mode { UdpRelayMode::Quic => { - log::info!( - "[relay] [packet] [{assoc_id:#06x}] [from-quic] [{pkt_id:#06x}] {frag_id}/{frag_total}", - assoc_id = pkt.assoc_id(), - pkt_id = pkt.pkt_id(), - frag_id = pkt.frag_id(), - frag_total = pkt.frag_total(), - ); Self::handle_packet(pkt).await; Ok(()) } @@ -92,13 +85,6 @@ impl Connection { Err(err) => Err(Error::Model(err)), Ok(Task::Packet(pkt)) => match self.udp_relay_mode { UdpRelayMode::Native => { - log::info!( - "[relay] [packet] [{assoc_id:#06x}] [from-native] [{pkt_id:#06x}] {frag_id}/{frag_total}", - assoc_id = pkt.assoc_id(), - pkt_id = pkt.pkt_id(), - frag_id = pkt.frag_id(), - frag_total = pkt.frag_total(), - ); Self::handle_packet(pkt).await; Ok(()) } diff --git a/tuic-client/src/connection/handle_task.rs b/tuic-client/src/connection/handle_task.rs index 8f521af..442a570 100644 --- a/tuic-client/src/connection/handle_task.rs +++ b/tuic-client/src/connection/handle_task.rs @@ -105,6 +105,12 @@ impl Connection { unreachable!() }; + log::info!( + "[relay] [packet] [{assoc_id:#06x}] [from-{mode}] [{pkt_id:#06x}] fragment {frag_id}/{frag_total}", + frag_id = pkt.frag_id() + 1, + frag_total = pkt.frag_total(), + ); + match pkt.accept().await { Ok(Some((pkt, addr, _))) => { log::info!("[relay] [packet] [{assoc_id:#06x}] [from-{mode}] [{pkt_id:#06x}] from {addr}"); diff --git a/tuic-server/src/connection/handle_task.rs b/tuic-server/src/connection/handle_task.rs index 8cda03f..9985801 100644 --- a/tuic-server/src/connection/handle_task.rs +++ b/tuic-server/src/connection/handle_task.rs @@ -90,6 +90,7 @@ impl Connection { id = self.id(), addr = self.inner.remote_address(), user = self.auth, + frag_id = frag_id + 1, ); self.udp_relay_mode.store(Some(mode)); @@ -103,6 +104,7 @@ impl Connection { id = self.id(), addr = self.inner.remote_address(), user = self.auth, + frag_id = frag_id + 1, ); return; }