update dns query
Some checks are pending
build Rule / execute_python_script (push) Waiting to run

This commit is contained in:
elysias123 2025-05-19 11:50:28 +08:00
parent ed27a4c220
commit 0647a71c01
2 changed files with 3 additions and 3 deletions

View File

@ -14,8 +14,8 @@ ip6_file=RULE_PATH + "/ip6.txt" # IPv6规则文件
def check_domain(domain):
resolver = dns.resolver.Resolver(configure=False)
resolver.nameservers = ['8.8.8.8', '1.1.1.1', '223.5.5.5', '9.9.9.9', '94.140.14.140']
resolver.timeout = 1
resolver.nameservers = [ '223.5.5.5', '119.29.29.29', '8.8.8.8', '1.1.1.1', '2400:3200:baba::1']
resolver.timeout = 3
resolver.lifetime = 5
result = {"A": False, "AAAA": False}

View File

@ -34,7 +34,7 @@ class RuleList:
valid_domains = set()
valid_domains_v6 = set()
with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:
future_to_domain = {executor.submit(config.check_domain, domain): domain for domain in domains}
for future in concurrent.futures.as_completed(future_to_domain):
domain = future_to_domain[future]