mirror of https://github.com/dnomd343/ClearDNS
				
				
			
				 8 changed files with 0 additions and 79 deletions
			
			
		| @ -1,35 +0,0 @@ | |||
| #!/usr/bin/python3 | |||
| # -*- coding:utf-8 -*- | |||
| 
 | |||
| import os, re | |||
| workDir = os.path.split(os.path.realpath(__file__))[0] | |||
| domainList = os.popen('sh ' + workDir + '/source.sh | sort -u').read().split('\n') | |||
| regex = r'^(?=^.{3,255}$)[a-zA-Z0-9][a-zA-Z0-9\-]{0,62}(.[a-zA-Z0-9][a-zA-Z0-9\-]{0,62})+$' | |||
| for domain in domainList: | |||
|     if re.search(regex, domain) is None: | |||
|         domainList.remove(domain) | |||
| with open (workDir + '/../chinalist.txt', 'w') as fileObj: | |||
|     fileObj.write('\n'.join(domainList) + '\n') | |||
| os.popen('gzip -cf9 ' + workDir + '/../chinalist.txt > ' + workDir + '/../chinalist.txt.gz') | |||
| 
 | |||
| from IPy import IP, IPSet | |||
| ipv4List = IPSet() | |||
| ipv6List = IPSet() | |||
| ipList = os.popen('sh ' + workDir + '/source-ip.sh | sort -u').read().split('\n') | |||
| for ipStr in ipList: | |||
|     try: | |||
|         ipAddr = IP(ipStr) | |||
|         if ipAddr.version() == 4: | |||
|             ipv4List.add(ipAddr) | |||
|         else: | |||
|             ipv6List.add(ipAddr) | |||
|     except: | |||
|         pass | |||
| ipList = [] | |||
| for ipAddr in ipv4List: | |||
|     ipList.append(str(ipAddr) if str(ipAddr).find('/') != -1 else str(ipAddr) + '/32') | |||
| for ipAddr in ipv6List: | |||
|     ipList.append(str(ipAddr) if str(ipAddr).find('/') != -1 else str(ipAddr) + '/128') | |||
| with open (workDir + '/../china-ip.txt', 'w') as fileObj: | |||
|     fileObj.write('\n'.join(ipList) + '\n') | |||
| os.popen('gzip -cf9 ' + workDir + '/../china-ip.txt > ' + workDir + '/../china-ip.txt.gz') | |||
| @ -1,21 +0,0 @@ | |||
| curl -sL https://github.com/misakaio/chnroutes2/raw/master/chnroutes.txt | sed '/^#/d' | |||
| curl -sL https://github.com/metowolf/iplist/raw/master/data/special/china.txt | |||
| curl -sL https://github.com/17mon/china_ip_list/raw/master/china_ip_list.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/cernet.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/china.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/chinanet.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/cmcc.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/cstnet.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/drpeng.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/googlecn.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/tietong.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/unicom.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/cernet6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/china6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/chinanet6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/cmcc6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/cstnet6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/drpeng6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/googlecn6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/tietong6.txt | |||
| curl -sL https://gaoyifan.github.io/china-operator-ip/unicom6.txt | |||
| @ -1,3 +0,0 @@ | |||
| curl -sL https://github.com/felixonmars/dnsmasq-china-list/raw/master/accelerated-domains.china.conf | sed '/^#/d' | sed 's/server=\///g;s/\/114.114.114.114//g' | |||
| curl -sL https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/direct-list.txt | grep -v ':' | |||
| curl -sL https://github.com/hq450/fancyss/raw/master/rules/WhiteList_new.txt | sed 's/Server=\///g;s/\///g' | |||
| @ -1,13 +0,0 @@ | |||
| #!/usr/bin/python3 | |||
| # -*- coding:utf-8 -*- | |||
| 
 | |||
| import os, re | |||
| workDir = os.path.split(os.path.realpath(__file__))[0] | |||
| domainList = os.popen('sh ' + workDir + '/source.sh | sort -u').read().split('\n') | |||
| regex = r'^(?=^.{3,255}$)[a-zA-Z0-9][a-zA-Z0-9\-]{0,62}(.[a-zA-Z0-9][a-zA-Z0-9\-]{0,62})+$' | |||
| for domain in domainList: | |||
|     if re.search(regex, domain) is None: | |||
|         domainList.remove(domain) | |||
| with open (workDir + '/../gfwlist.txt', 'w') as fileObj: | |||
|     fileObj.write('\n'.join(domainList) + '\n') | |||
| os.popen('gzip -cf9 ' + workDir + '/../gfwlist.txt > ' + workDir + '/../gfwlist.txt.gz') | |||
| @ -1,4 +0,0 @@ | |||
| curl -sL https://github.com/Loukky/gfwlist-by-loukky/raw/master/gfwlist.txt | base64 -d | sed '/^$\|@@/d' | sed 's#!.\+##;s#|##g;s#@##g;s#http:\/\/##;s#https:\/\/##;' | sed '/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$/d' | grep '^[0-9a-zA-Z\.-]\+$' | grep '\.' | sed 's#^\.\+##' | |||
| curl -sL https://github.com/gfwlist/gfwlist/raw/master/gfwlist.txt | base64 -d | sed '/^$\|@@/d' | sed 's#!.\+##;s#|##g;s#@##g;s#http:\/\/##;s#https:\/\/##;' | sed '/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$/d' | grep '^[0-9a-zA-Z\.-]\+$' | grep '\.' | sed 's#^\.\+##' | |||
| curl -sL https://github.com/hq450/fancyss/raw/master/rules/gfwlist.conf | sed 's/ipset=\/\.//g;s/\/gfwlist//g;/^server/d' | |||
| curl -sL https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/gfw.txt | |||
					Loading…
					
					
				
		Reference in new issue