From 9eb504cf0bf418931249f4cf49cfed54ef801148 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Tue, 23 Apr 2024 01:18:06 +0300 Subject: [PATCH] Filter out broken cloudfront.net subdomains, to shrink PAC size --- scripts/resolve-dns-nxdomain.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/resolve-dns-nxdomain.py b/scripts/resolve-dns-nxdomain.py index 88a0297..55c2c0d 100755 --- a/scripts/resolve-dns-nxdomain.py +++ b/scripts/resolve-dns-nxdomain.py @@ -51,8 +51,11 @@ class AZResolver(dns.asyncresolver.Resolver): dns.resolver.YXDOMAIN, dns.resolver.NoNameservers): return domain except dns.resolver.NoAnswer: - # Do not thread domain as broken if the answer is empty - pass + # Do not thread domain as broken if the answer is empty, + # but do if it's cloudfront subdomain + if domain.endswith('.cloudfront.net'): + return domain + def tasksProvider(domainiter, resolver): for domain in domainiter: