1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-20 19:11:30 +08:00

update-12.20

This commit is contained in:
github-actions[bot]
2021-12-20 20:33:54 +08:00
parent 32956d3d87
commit 9fab46d28b
2 changed files with 12 additions and 16 deletions

View File

@ -9,7 +9,7 @@ DIR=/usr/share/bypass
TMP=/tmp/bypass
log(){
[ $A = N ] && echo "$(date +'%Y-%m-%d %H:%M:%S') $*" >> /var/log/bypass.log
echo "$(date +'%Y-%m-%d %H:%M:%S') $*" >> /var/log/bypass.log
}
C=$(uci -q get bypass.@global[0].run_mode)
@ -19,12 +19,9 @@ if [ $A = Y ];then
fi
if [ "$C" = router ];then
if [ $A = Y ];then
mkdir -p $TMP
while ! B=$(curl -kLfsm 9 https://ispip.clang.cn/all_cn.txt);do
while ! B=$(curl -kLfsm 5 https://ispip.clang.cn/all_cn.txt || curl -kLfsm 5 https://op.supes.top/all_cn.txt);do
sleep 2
done
else
B=$(curl -kLfsm 9 https://ispip.clang.cn/all_cn.txt)
fi
[ -n "$B" ] && echo "$B" > /tmp/china.txt
@ -37,12 +34,9 @@ if [ "$C" = router ];then
fi
if [ $A = Y ];then
mkdir -p $TMP
while ! D=$(curl -kLfsm 9 https://ispip.clang.cn/all_cn_ipv6.txt);do
while ! D=$(curl -kLfsm 5 https://ispip.clang.cn/all_cn_ipv6.txt || curl -kLfsm 5 https://op.supes.top/all_cn_ipv6.txt);do
sleep 2
done
else
D=$(curl -kLfsm 9 https://ispip.clang.cn/all_cn_ipv6.txt)
fi
[ -n "$D" ] && echo "$D" > /tmp/china_v6.txt
@ -57,11 +51,9 @@ fi
if [ "$C" = gfw -o "$(uci -q get bypass.@global[0].gfw_mode)" = 1 ];then
if [ $A = Y ];then
while ! curl -kLfsm 5 -o /tmp/gfw.b64 https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt;do
while ! (curl -kLfsm 5 -o /tmp/gfw.b64 https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt || curl -Lfso /tmp/gfw.b64 https://op.supes.top/gfwlist.txt);do
sleep 2
done
else
curl -Lfso /tmp/gfw.b64 https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt || curl -Lfso /tmp/gfw.b64 https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
fi
$DIR/by-gfw
if ! cmp -s /tmp/gfwnew.txt $TMP/gfw.list;then

View File

@ -2,13 +2,17 @@
set -o pipefail
rm -rf /tmp/mosdns
mkdir /tmp/mosdns
wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/geoip.dat -nv -O /tmp/mosdns/geoip.dat
wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/geosite.dat -nv -O /tmp/mosdns/geosite.dat
wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/serverlist.txt -nv -O /tmp/mosdns/serverlist.txt
#wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/geoip.dat -nv -O /tmp/mosdns/geoip.dat
#wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/geosite.dat -nv -O /tmp/mosdns/geosite.dat
#wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/serverlist.txt -nv -O /tmp/mosdns/serverlist.txt
wget https://gh.404delivr.workers.dev/https://github.com/QiuSimons/openwrt-mos/raw/master/luci-app-mosdns/root/etc/mosdns/geoip.dat -nv -O /tmp/mosdns/geoip.dat
wget https://gh.404delivr.workers.dev/https://github.com/QiuSimons/openwrt-mos/raw/master/luci-app-mosdns/root/etc/mosdns/geosite.dat -nv -O /tmp/mosdns/geosite.dat
wget https://gh.404delivr.workers.dev/https://github.com/QiuSimons/openwrt-mos/raw/master/luci-app-mosdns/root/etc/mosdns/serverlist.txt -nv -O /tmp/mosdns/serverlist.txt
find /tmp/mosdns/* -size -20k -exec rm {} \;
syncconfig=$(uci -q get mosdns.mosdns.syncconfig)
if [ $syncconfig -eq 1 ]; then
wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/config.yaml -nv -O /tmp/mosdns/config.yaml
#wget https://cdn.jsdelivr.net/gh/QiuSimons/openwrt-mos@master/luci-app-mosdns/root/etc/mosdns/config.yaml -nv -O /tmp/mosdns/config.yaml
wget https://gh.404delivr.workers.dev/https://github.com/QiuSimons/openwrt-mos/raw/master/luci-app-mosdns/root/etc/mosdns/config.yaml -nv -O /tmp/mosdns/config.yaml
find /tmp/mosdns/* -size -2k -exec rm {} \;
fi
chmod -R 755 /tmp/mosdns