mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-03 17:45:44 +00:00
avoid udp hole punch go through tun (#1155)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user