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
+8
View File
@@ -700,6 +700,10 @@ impl<C: NatDstConnector> TcpProxy<C> {
}
}
pub fn get_global_ctx(&self) -> &ArcGlobalCtx {
&self.global_ctx
}
pub fn is_smoltcp_enabled(&self) -> bool {
self.enable_smoltcp
.load(std::sync::atomic::Ordering::Relaxed)
@@ -783,4 +787,8 @@ impl<C: NatDstConnector> TcpProxy<C> {
Some(())
}
pub fn get_peer_manager(&self) -> &Arc<PeerManager> {
&self.peer_manager
}
}