verify: fix cdnlist logic
This commit is contained in:
parent
56344f430d
commit
b7c22157dd
|
@ -0,0 +1,2 @@
|
|||
www.azure.cn.mschcdn.com
|
||||
www.gov.cn
|
|
@ -24,7 +24,7 @@ except:
|
|||
|
||||
with open("accelerated-domains.china.raw.txt") as f:
|
||||
domains = random.sample([line.rstrip('\n') for line in f], 100)
|
||||
# domains = [line.rstrip('\n') for line in f][46389:46400]
|
||||
# domains = [line.rstrip('\n') for line in f][13820:13830]
|
||||
|
||||
|
||||
def cn_ip_test(domain):
|
||||
|
@ -56,7 +56,10 @@ for domain in domains:
|
|||
if any(i in nameserver_text for i in whitelist):
|
||||
print(colored("NS Whitelist matched for domain: " + domain, "green"))
|
||||
elif domain.count(".") > 1 or any(testdomain.endswith(domain) for testdomain in cdnlist):
|
||||
if testdomain is None:
|
||||
for testdomain in cdnlist:
|
||||
if testdomain.endswith(domain):
|
||||
break
|
||||
else:
|
||||
testdomain = domain
|
||||
if chnroutes:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue