fix tcp incoming failure when kcp proxy is enabled (#601)

This commit is contained in:
Sijie.Sun
2025-02-06 09:08:34 +08:00
committed by GitHub
parent 1e821a03fe
commit 8b89a037e8
4 changed files with 35 additions and 11 deletions
+7 -7
View File
@@ -382,13 +382,6 @@ impl Instance {
self.run_rpc_server().await?;
// run after tun device created, so listener can bind to tun device, which may be required by win 10
self.ip_proxy = Some(IpProxy::new(
self.get_global_ctx(),
self.get_peer_manager(),
)?);
self.run_ip_proxy().await?;
if self.global_ctx.get_flags().enable_kcp_proxy {
let src_proxy = KcpProxySrc::new(self.get_peer_manager()).await;
src_proxy.start().await;
@@ -401,6 +394,13 @@ impl Instance {
self.kcp_proxy_dst = Some(dst_proxy);
}
// run after tun device created, so listener can bind to tun device, which may be required by win 10
self.ip_proxy = Some(IpProxy::new(
self.get_global_ctx(),
self.get_peer_manager(),
)?);
self.run_ip_proxy().await?;
self.udp_hole_puncher.lock().await.run().await?;
self.peer_center.init().await;