Mattraks aabeddc2b0 luci-app-ssr-plus (#2815)
* v2ray-core:Add v2ray-core self compilation
Network ---> Project V ---> <*> v2ray-core
You can custom the features in "V2Ray Configuration" option.

* luci-app-ssr-plus
0.Add v2ray-core
1.Makefile Standard install
2.Fix vmess v2ray
3.Optimize update scripts
4.Add ad filter (not enabled)
5.Code formatting
6.Clear basic data

* luci-app-ssr-plus:Add ad filter settings UI

* luci-app-ssr-plus:Fix Filter invalid nodes

* luci-app-ssr-plus:update china_ssr.txt

* luci-app-ssr-plus:Fix
2020-01-23 19:18:35 +08:00

32 lines
971 B
Bash
Executable File

#!/bin/sh -e
generate_china_banned()
{
cat $1 | base64 -d > /tmp/gfwlist.txt
rm -f $1
sed -i '/^@@|/d' /tmp/gfwlist.txt
cat /tmp/gfwlist.txt | sort -u |
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; /byr\.cn/d; /jlike\.com/d; /weibo\.com/d; /zhongsou\.com/d; /youdao\.com/d; /sogou\.com/d; /so\.com/d; /soso\.com/d; /aliyun\.com/d; /taobao\.com/d; /jd\.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 |
awk '
BEGIN { prev = "________"; } {
cur = $0;
if (index(cur, prev) == 1 && substr(cur, 1 + length(prev) ,1) == ".") {
} else {
print cur;
prev = cur;
}
}' | sort -u
}
generate_china_banned /tmp/gfw.b64 > /tmp/gfw.txt
rm -f /tmp/gfwlist.txt
sed '/.*/s/.*/server=\/\.&\/127.0.0.1#5335\nipset=\/\.&\/gfwlist/' /tmp/gfw.txt >/tmp/gfwnew.txt
rm -f /tmp/gfw.txt