mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 02:09:06 +00:00
allow loopback src address in listener (#1730)
This commit is contained in:
@@ -416,6 +416,15 @@ impl QUICProxyDst {
|
||||
|
||||
let send_to_self = Some(*dst_socket.ip()) == ctx.get_ipv4().map(|ip| ip.address());
|
||||
if send_to_self && ctx.no_tun() {
|
||||
if ctx.is_port_in_running_listeners(dst_socket.port(), false)
|
||||
&& ctx.is_ip_in_same_network(&src_ip)
|
||||
{
|
||||
return Err(anyhow::anyhow!(
|
||||
"dst socket {:?} is in running listeners, ignore it",
|
||||
dst_socket
|
||||
)
|
||||
.into());
|
||||
}
|
||||
dst_socket = format!("127.0.0.1:{}", dst_socket.port()).parse().unwrap();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user