remove some dep

This commit is contained in:
sijie.sun
2025-02-18 23:10:41 +08:00
committed by Sijie.Sun
parent 2632c44195
commit 2050ed78d0
4 changed files with 149 additions and 239 deletions

View File

@@ -19,6 +19,8 @@ pub mod direct;
pub mod manual;
pub mod udp_hole_punch;
mod http_connector;
async fn set_bind_addr_for_peer_connector(
connector: &mut (impl TunnelConnector + ?Sized),
is_ipv4: bool,

View File

@@ -361,7 +361,9 @@ impl KcpProxyDst {
proxy_entries.remove(&conn_id);
}
if Some(dst_socket.ip()) == global_ctx.get_ipv4().map(|ip| IpAddr::V4(ip.address())) {
if Some(dst_socket.ip()) == global_ctx.get_ipv4().map(|ip| IpAddr::V4(ip.address()))
&& global_ctx.no_tun()
{
dst_socket = format!("127.0.0.1:{}", dst_socket.port()).parse().unwrap();
}