mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 18:24:36 +00:00
make kcp proxy compitible with old version (#585)
* fix kcp not work with smoltcp * check if dst kcp input is enabled
This commit is contained in:
@@ -10,7 +10,7 @@ use crate::{
|
||||
global_ctx::{ArcGlobalCtx, GlobalCtxEvent, NetworkIdentity},
|
||||
PeerId,
|
||||
},
|
||||
proto::cli::PeerConnInfo,
|
||||
proto::{cli::PeerConnInfo, common::PeerFeatureFlag},
|
||||
tunnel::{packet_def::ZCPacket, TunnelError},
|
||||
};
|
||||
|
||||
@@ -167,6 +167,16 @@ impl PeerMap {
|
||||
None
|
||||
}
|
||||
|
||||
pub async fn get_peer_feature_flag(&self, peer_id: PeerId) -> Option<PeerFeatureFlag> {
|
||||
for route in self.routes.read().await.iter() {
|
||||
let feature_flag = route.get_feature_flag(peer_id).await;
|
||||
if feature_flag.is_some() {
|
||||
return feature_flag;
|
||||
};
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.peer_map.is_empty()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user