mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 16:14:11 +00:00
Bypass dns_resolve if IP rules are empty
This commit is contained in:
@@ -332,6 +332,9 @@ impl AccessControl {
|
||||
if let Some(value) = self.check_host_in_proxy_list(host) {
|
||||
return value;
|
||||
}
|
||||
if self.is_ipv4_empty() && self.is_ipv6_empty() {
|
||||
return !self.is_default_in_proxy_list();
|
||||
}
|
||||
if let Ok(vaddr) = context.dns_resolve(host, port).await {
|
||||
for addr in vaddr {
|
||||
if !self.check_ip_in_proxy_list(&addr.ip()) {
|
||||
|
||||
Reference in New Issue
Block a user