mirror of https://github.com/dnomd343/ClearDNS
dnomd343
4 years ago
5 changed files with 104 additions and 5 deletions
@ -0,0 +1,35 @@ |
|||
SOURCE="$0" |
|||
while [ -h "$SOURCE" ]; do |
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|||
SOURCE="$(readlink "$SOURCE")" |
|||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" |
|||
done |
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|||
cd $DIR |
|||
|
|||
let num=1 |
|||
while read -r cmd |
|||
do |
|||
eval $cmd" > data_"$num |
|||
let num++ |
|||
done < source.sh |
|||
|
|||
files="" |
|||
for ((i=1;i<$num;i++)) |
|||
do |
|||
files="$files data_$i" |
|||
done |
|||
eval "cat $files | sort -u > data" |
|||
eval "rm -f $files" |
|||
|
|||
cat /dev/null > output.txt |
|||
while read -r domain |
|||
do |
|||
flag=$(echo $domain | gawk '/^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?$/{print $0}') |
|||
if [ -n "${flag}" ]; then |
|||
echo "$domain" >> output.txt |
|||
fi |
|||
done < data |
|||
rm data |
|||
|
|||
mv -f output.txt ../chinalist.txt |
@ -0,0 +1,2 @@ |
|||
curl https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | sed 's/server=\///g;s/\/114.114.114.114//g' |
|||
curl https://raw.githubusercontent.com/hq450/fancyss/master/rules/WhiteList_new.txt | sed 's/Server=\///g;s/\///g' |
@ -0,0 +1,35 @@ |
|||
SOURCE="$0" |
|||
while [ -h "$SOURCE" ]; do |
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|||
SOURCE="$(readlink "$SOURCE")" |
|||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" |
|||
done |
|||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|||
cd $DIR |
|||
|
|||
let num=1 |
|||
while read -r cmd |
|||
do |
|||
eval $cmd" > data_"$num |
|||
let num++ |
|||
done < source.sh |
|||
|
|||
files="" |
|||
for ((i=1;i<$num;i++)) |
|||
do |
|||
files="$files data_$i" |
|||
done |
|||
eval "cat $files | sort -u > data" |
|||
eval "rm -f $files" |
|||
|
|||
cat /dev/null > output.txt |
|||
while read -r domain |
|||
do |
|||
flag=$(echo $domain | gawk '/^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?$/{print $0}') |
|||
if [ -n "${flag}" ]; then |
|||
echo "$domain" >> output.txt |
|||
fi |
|||
done < data |
|||
rm data |
|||
|
|||
mv -f output.txt ../gfwlist.txt |
@ -0,0 +1,4 @@ |
|||
curl https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt | base64 -d | sort -u | sed '/^$\|@@/d'| sed 's#!.\+##; s#|##g; s#@##g; s#http:\/\/##; s#https:\/\/##;' | sed '/\*/d; /apple\.com/d; /sina\.cn/d; /sina\.com\.cn/d; /baidu\.com/d; /qq\.com/d' | sed '/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$/d' | grep '^[0-9a-zA-Z\.-]\+$' | grep '\.' | sed 's#^\.\+##' | sort -u |
|||
curl https://raw.githubusercontent.com/Loukky/gfwlist-by-loukky/master/gfwlist.txt | base64 -d | sort -u | sed '/^$\|@@/d'| sed 's#!.\+##; s#|##g; s#@##g; s#http:\/\/##; s#https:\/\/##;' | sed '/\*/d; /apple\.com/d; /sina\.cn/d; /sina\.com\.cn/d; /baidu\.com/d; /qq\.com/d' | sed '/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$/d' | grep '^[0-9a-zA-Z\.-]\+$' | grep '\.' | sed 's#^\.\+##' | sort -u |
|||
curl https://raw.githubusercontent.com/hq450/fancyss/master/rules/gfwlist.conf | sed 's/ipset=\/\.//g; s/\/gfwlist//g; /^server/d' |
|||
curl -L "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$(curl --silent "https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/gfw.txt" |
Loading…
Reference in new issue