mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-10-15 09:06:14 -08:00
merge
This commit is contained in:
1 parent
6b01554c17
commit
a60f101bda
13 files changed
+137
-168
No files matched your search
@@ -44,20 +44,20 @@ impl ProxyCidrsMonitor {
|
||||
proxy_cidrs.insert(vpn_cfg.client_cidr);
|
||||
}
|
||||
|
||||
#[cfg(feature = "magic-dns")]
|
||||
{
|
||||
use crate::dns::config::DnsGlobalCtxExt;
|
||||
if let Some(dns) = global_ctx.dns_server() {
|
||||
proxy_cidrs.extend(dns.addresses().into_iter().filter_map(|a| match a.ip() {
|
||||
IpAddr::V4(ip) => Some(cidr::Ipv4Cidr::new_host(ip)),
|
||||
_ => None,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
proxy_cidrs
|
||||
};
|
||||
|
||||
#[cfg(feature = "magic-dns")]
|
||||
{
|
||||
use crate::dns::config::DnsGlobalCtxExt;
|
||||
if let Some(dns) = global_ctx.dns_server() {
|
||||
proxy_cidrs.extend(dns.addresses().into_iter().filter_map(|a| match a.ip() {
|
||||
IpAddr::V4(ip) => Some(cidr::Ipv4Cidr::new_host(ip)),
|
||||
_ => None,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate diff
|
||||
if cur_proxy_cidrs == &proxy_cidrs {
|
||||
return (proxy_cidrs, Vec::new(), Vec::new());
|
||||
|
||||
Reference in new issue
Block a user