mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2025-07-03 00:05:47 +00:00
Consider peers to be on same intranet if is_lan() returns true for both
This commit is contained in:
parent
aeeca0d7d1
commit
85a20769fb
@ -706,17 +706,14 @@ impl RendezvousServer {
|
|||||||
}
|
}
|
||||||
ph.nat_type = NatType::SYMMETRIC.into(); // will force relay
|
ph.nat_type = NatType::SYMMETRIC.into(); // will force relay
|
||||||
}
|
}
|
||||||
let same_intranet = !ws
|
let same_intranet: bool = !ws
|
||||||
&& match peer_addr {
|
&& (peer_is_lan && is_lan || {
|
||||||
SocketAddr::V4(a) => match addr {
|
match (peer_addr, addr) {
|
||||||
SocketAddr::V4(b) => a.ip() == b.ip(),
|
(SocketAddr::V4(a), SocketAddr::V4(b)) => a.ip() == b.ip(),
|
||||||
|
(SocketAddr::V6(a), SocketAddr::V6(b)) => a.ip() == b.ip(),
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
}
|
||||||
SocketAddr::V6(a) => match addr {
|
});
|
||||||
SocketAddr::V6(b) => a.ip() == b.ip(),
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
let socket_addr = AddrMangle::encode(addr).into();
|
let socket_addr = AddrMangle::encode(addr).into();
|
||||||
if same_intranet {
|
if same_intranet {
|
||||||
log::debug!(
|
log::debug!(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user