Browse Source

update: remove legacy list-build

dev
dnomd343 3 years ago
parent
commit
6b13ee4610
  1. 35
      list-build/chinalist/build.sh
  2. 2
      list-build/chinalist/source.sh
  3. 35
      list-build/gfwlist/build.sh
  4. 4
      list-build/gfwlist/source.sh

35
list-build/chinalist/build.sh

@ -1,35 +0,0 @@
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

2
list-build/chinalist/source.sh

@ -1,2 +0,0 @@
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'

35
list-build/gfwlist/build.sh

@ -1,35 +0,0 @@
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

4
list-build/gfwlist/source.sh

@ -1,4 +0,0 @@
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…
Cancel
Save