avoid udp hole punch go through tun (#1155)

This commit is contained in:
Sijie.Sun
2025-07-26 14:39:03 +08:00
committed by GitHub
parent 354a4e1d7b
commit 7dc5988620
4 changed files with 61 additions and 10 deletions
@@ -223,8 +223,12 @@ impl PunchConeHoleClient {
tracing::debug!(?socket, ?tid, "punched socket found, try connect with it");
for _ in 0..2 {
match try_connect_with_socket(socket.socket.clone(), remote_mapped_addr.into())
.await
match try_connect_with_socket(
global_ctx.clone(),
socket.socket.clone(),
remote_mapped_addr.into(),
)
.await
{
Ok(tunnel) => {
tracing::info!(?tunnel, "hole punched");