add tcp hole punching (#1713)

add tcp hole punching and tcp stun test
This commit is contained in:
KKRainbow
2025-12-28 21:35:30 +08:00
committed by GitHub
parent 37531507db
commit c19cd1bff3
29 changed files with 1502 additions and 300 deletions
+1 -3
View File
@@ -14,7 +14,6 @@ use tokio::{sync::Mutex, task::JoinHandle};
use crate::{
common::{stun::StunInfoCollectorTrait, PeerId},
connector::direct::PeerManagerForDirectConnector,
peers::{
peer_manager::PeerManager,
peer_task::{PeerTaskLauncher, PeerTaskManager},
@@ -461,8 +460,7 @@ impl PeerTaskLauncher for UdpHolePunchPeerTaskLauncher {
continue;
}
let conns = data.peer_mgr.list_peer_conns(peer_id).await;
if conns.is_some() && !conns.unwrap().is_empty() {
if data.peer_mgr.get_peer_map().has_peer(peer_id) {
continue;
}