luci-app-adbyby-plus: replace wget-ssl with uclient-fetchuclient

This commit is contained in:
lean 2021-06-21 09:27:02 +08:00
parent 2a5057a7ca
commit 1e60e3186e
6 changed files with 13 additions and 13 deletions

View File

@ -6,11 +6,11 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Adbyby
LUCI_DEPENDS:=+adbyby +wget +ipset +dnsmasq-full
LUCI_DEPENDS:=+adbyby +uclient-fetch +ipset +dnsmasq-full
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-adbyby-plus
PKG_VERSION:=2.0
PKG_RELEASE:=73
PKG_RELEASE:=75
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -54,7 +54,7 @@ luci.sys.exec("/usr/share/adbyby/rule-update")
retstring ="0"
end
else
refresh_cmd="wget-ssl -q --no-check-certificate -O - 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' > /tmp/adnew.conf"
refresh_cmd="uclient-fetch -q --no-check-certificate -O - 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' > /tmp/adnew.conf"
sret=luci.sys.call(refresh_cmd .. " 2>/dev/null")
if sret== 0 then
luci.sys.call("/usr/share/adbyby/ad-update")

View File

@ -1,6 +1,6 @@
#!/bin/sh
wget-ssl --no-check-certificate -O - 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' > /tmp/adnew.conf
uclient-fetch --no-check-certificate -O - 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' > /tmp/adnew.conf
if [ -s "/tmp/adnew.conf" ];then
/usr/share/adbyby/ad-update
fi

View File

@ -4,11 +4,11 @@ if [ ! -f "/tmp/adbyby.updated" ];then
wget_ok="0"
while [ "$wget_ok" = "0" ]
do
wget-ssl --spider --quiet --tries=1 --timeout=3 www.baidu.com
uclient-fetch --spider --quiet --tries=1 --timeout=3 www.baidu.com
if [ "$?" == "0" ]; then
wget_ok="1"
touch /tmp/md5.json && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json
touch /tmp/md5.json && uclient-fetch --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json
adm5=$(md5sum /tmp/md5.json | awk -F' ' '{print $1}')
touch /tmp/adbyby/admd5.json && bmd5=$(md5sum /tmp/adbyby/admd5.json | awk -F' ' '{print $1}')
if [ "$adm5" == "$bmd5" ];then
@ -17,8 +17,8 @@ if [ ! -f "/tmp/adbyby.updated" ];then
exit 0
elif [ -s /tmp/md5.json ];then
touch /tmp/lazy.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/lazy.txt
touch /tmp/video.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/video.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/video.txt
touch /tmp/lazy.txt && uclient-fetch --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/lazy.txt
touch /tmp/video.txt && uclient-fetch --no-check-certificate -t 1 -T 10 -O /tmp/video.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/video.txt
touch /tmp/local-md5.json && md5sum /tmp/lazy.txt /tmp/video.txt > /tmp/local-md5.json

View File

@ -5,11 +5,11 @@ if [ ! -f "/tmp/adbyby.updated" ];then
wget_ok="0"
while [ "$wget_ok" = "0" ]
do
wget-ssl --spider --quiet --tries=1 --timeout=3 www.baidu.com
uclient-fetch --spider --quiet --tries=1 --timeout=3 www.baidu.com
if [ "$?" == "0" ]; then
wget_ok="1"
touch /tmp/md5.json && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json
touch /tmp/md5.json && uclient-fetch --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json
adm5=$(md5sum /tmp/md5.json | awk -F' ' '{print $1}')
touch /tmp/adbyby/admd5.json && bmd5=$(md5sum /tmp/adbyby/admd5.json | awk -F' ' '{print $1}')
if [ "$adm5" == "$bmd5" ];then
@ -18,8 +18,8 @@ if [ ! -f "/tmp/adbyby.updated" ];then
exit 0
else
touch /tmp/lazy.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/lazy.txt
touch /tmp/video.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/video.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/video.txt
touch /tmp/lazy.txt && uclient-fetch --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/lazy.txt
touch /tmp/video.txt && uclient-fetch --no-check-certificate -t 1 -T 10 -O /tmp/video.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/video.txt
touch /tmp/local-md5.json && md5sum /tmp/lazy.txt /tmp/video.txt > /tmp/local-md5.json

View File

@ -8,7 +8,7 @@ convert_rules() {
mkdir -p /tmp/rules/data
mkdir -p /tmp/rules/host
wget-ssl -q --no-check-certificate $1 -O /tmp/adnew.conf
uclient-fetch -q --no-check-certificate $1 -O /tmp/adnew.conf
rulename=$(url_md5 $1)