From 7fff9ed3acde0a3318dd7a63f93681ad8c52edf1 Mon Sep 17 00:00:00 2001 From: red binder Date: Tue, 21 Jul 2026 22:16:36 +0200 Subject: [PATCH] fix sending internal ping to console --- prudpv1-proxy/src/proxy_secure.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prudpv1-proxy/src/proxy_secure.rs b/prudpv1-proxy/src/proxy_secure.rs index c99c68b..31d0b01 100644 --- a/prudpv1-proxy/src/proxy_secure.rs +++ b/prudpv1-proxy/src/proxy_secure.rs @@ -11,6 +11,7 @@ use tokio::net::TcpStream; use tokio::task; use tokio::time::sleep; use tracing::error; +use tokio::io::AsyncWriteExt; pub async fn start(param: ProxyStartupParam) { let (router_secure, _) = Router::new(param.self_private) @@ -101,12 +102,16 @@ pub async fn start(param: ProxyStartupParam) { } }; + if data == [0,0,0,0,0] { + continue; + } + if conn.send(data).await == None{ break 'a; } }, _ = sleep(Duration::from_secs(10)) => { - conn.send([0,0,0,0,0].to_vec()).await; + stream.write_all(&[0,0,0,0,0].to_vec()).await.ok(); } } }