fix foreign network direct conn with mapped listeners (#1363)

This commit is contained in:
Sijie.Sun authored and GitHub committed 2025-09-13 08:48:12 +08:00
1 parent ae704d1d5f
commit d0efc40efb
1 file changed
+2
@@ -171,6 +171,8 @@ impl ForeignNetworkEntry {
flags.disable_relay_kcp = !global_ctx.get_flags().enable_relay_foreign_network_kcp;
config.set_flags(flags);
config.set_mapped_listeners(Some(global_ctx.config.get_mapped_listeners()));
let foreign_global_ctx = Arc::new(GlobalCtx::new(config));
foreign_global_ctx
.replace_stun_info_collector(Box::new(global_ctx.get_stun_info_collector().clone()));