mirror of
https://bitbucket.org/anticensority/antizapret-pac-generator-light.git
synced 2024-11-25 14:46:04 +03:00
Filter out broken cloudfront.net subdomains, to shrink PAC size
This commit is contained in:
parent
2d798142e6
commit
9eb504cf0b
@ -51,8 +51,11 @@ class AZResolver(dns.asyncresolver.Resolver):
|
|||||||
dns.resolver.YXDOMAIN, dns.resolver.NoNameservers):
|
dns.resolver.YXDOMAIN, dns.resolver.NoNameservers):
|
||||||
return domain
|
return domain
|
||||||
except dns.resolver.NoAnswer:
|
except dns.resolver.NoAnswer:
|
||||||
# Do not thread domain as broken if the answer is empty
|
# Do not thread domain as broken if the answer is empty,
|
||||||
pass
|
# but do if it's cloudfront subdomain
|
||||||
|
if domain.endswith('.cloudfront.net'):
|
||||||
|
return domain
|
||||||
|
|
||||||
|
|
||||||
def tasksProvider(domainiter, resolver):
|
def tasksProvider(domainiter, resolver):
|
||||||
for domain in domainiter:
|
for domain in domainiter:
|
||||||
|
Loading…
Reference in New Issue
Block a user