allow tcp port forward use kcp (#838)

This commit is contained in:
Sijie.Sun
2025-05-11 00:48:34 +08:00
committed by GitHub
parent c5580feb64
commit 72be46e8fa
6 changed files with 107 additions and 14 deletions

View File

@@ -106,8 +106,8 @@ async fn handle_kcp_output(
#[derive(Debug, Clone)]
pub struct NatDstKcpConnector {
kcp_endpoint: Arc<KcpEndpoint>,
peer_mgr: Arc<PeerManager>,
pub(crate) kcp_endpoint: Arc<KcpEndpoint>,
pub(crate) peer_mgr: Arc<PeerManager>,
}
#[async_trait::async_trait]
@@ -299,6 +299,10 @@ impl KcpProxySrc {
pub fn get_tcp_proxy(&self) -> Arc<TcpProxy<NatDstKcpConnector>> {
self.tcp_proxy.0.clone()
}
pub fn get_kcp_endpoint(&self) -> Arc<KcpEndpoint> {
self.kcp_endpoint.clone()
}
}
pub struct KcpProxyDst {