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:
Sijie.Sun
2025-01-26 16:22:10 +08:00
committed by GitHub
parent b69b122c8d
commit 2a5d5ea4df
9 changed files with 78 additions and 11 deletions

View File

@@ -4,8 +4,11 @@ use dashmap::DashMap;
use crate::{
common::{global_ctx::NetworkIdentity, PeerId},
proto::peer_rpc::{
ForeignNetworkRouteInfoEntry, ForeignNetworkRouteInfoKey, RouteForeignNetworkInfos,
proto::{
common::PeerFeatureFlag,
peer_rpc::{
ForeignNetworkRouteInfoEntry, ForeignNetworkRouteInfoKey, RouteForeignNetworkInfos,
},
},
};
@@ -94,6 +97,8 @@ pub trait Route {
async fn set_route_cost_fn(&self, _cost_fn: RouteCostCalculator) {}
async fn get_feature_flag(&self, peer_id: PeerId) -> Option<PeerFeatureFlag>;
async fn dump(&self) -> String {
"this route implementation does not support dump".to_string()
}