mirror of
https://github.com/TG-Twilight/AWAvenue-Ads-Rule.git
synced 2025-11-04 14:49:47 +08:00
This commit is contained in:
parent
ed27a4c220
commit
0647a71c01
@ -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}
|
||||
|
||||
2
main.py
2
main.py
@ -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]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user