ipv6 mangle

This commit is contained in:
rustdesk
2022-12-26 16:41:33 +08:00
parent a848fa0f9b
commit 633253647f
2 changed files with 40 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
use std::{
collections::HashMap,
fs,
net::{IpAddr, Ipv4Addr, SocketAddr},
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
path::{Path, PathBuf},
sync::{Arc, Mutex, RwLock},
time::SystemTime,
@@ -512,7 +512,12 @@ impl Config {
#[inline]
pub fn get_any_listen_addr() -> SocketAddr {
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0)
SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0)
}
#[inline]
pub fn get_any_listen_addr_v6() -> SocketAddr {
SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), 0)
}
pub fn get_rendezvous_server() -> String {