optimize the condition of enabling kcp (#1210)

This commit is contained in:
Sijie.Sun
2025-08-09 16:16:09 +08:00
committed by GitHub
parent 37b24164b6
commit 8ffc2f12e4
11 changed files with 110 additions and 18 deletions
+7
View File
@@ -86,6 +86,13 @@ pub trait Route {
None
}
async fn get_peer_id_by_ip(&self, ip: &std::net::IpAddr) -> Option<PeerId> {
match ip {
std::net::IpAddr::V4(v4) => self.get_peer_id_by_ipv4(v4).await,
std::net::IpAddr::V6(v6) => self.get_peer_id_by_ipv6(v6).await,
}
}
async fn list_peers_own_foreign_network(
&self,
_network_identity: &NetworkIdentity,