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
+5 -1
View File
@@ -101,6 +101,10 @@ impl GlobalCtx {
let enable_exit_node = config_fs.get_flags().enable_exit_node;
let no_tun = config_fs.get_flags().no_tun;
let mut feature_flags = PeerFeatureFlag::default();
feature_flags.kcp_input = !config_fs.get_flags().disable_kcp_input;
feature_flags.no_relay_kcp = config_fs.get_flags().disable_relay_kcp;
GlobalCtx {
inst_name: config_fs.get_inst_name(),
id,
@@ -123,7 +127,7 @@ impl GlobalCtx {
enable_exit_node,
no_tun,
feature_flags: AtomicCell::new(PeerFeatureFlag::default()),
feature_flags: AtomicCell::new(feature_flags),
}
}