Commit b7c22157 authored by Felix Yan's avatar Felix Yan

verify: fix cdnlist logic

parent 56344f43
www.azure.cn.mschcdn.com
www.gov.cn
\ No newline at end of file
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment