let ssr plus can subscribe cccat.pw

This commit is contained in:
coolsnowwolf 2018-10-18 23:46:35 +08:00
parent 074023cab6
commit f1d52b9f05
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Plus
LUCI_DEPENDS:=+shadowsocksr-libev +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget
LUCI_PKGARCH:=all
PKG_VERSION:=1
PKG_RELEASE:=16
PKG_RELEASE:=17
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -33,7 +33,7 @@ o = s:option(Button,"update",translate("Update"))
o.inputstyle = "reload"
o.write = function()
luci.sys.call("nohup bash /usr/share/shadowsocksr/subscribe.sh > /tmp/subupdate.log 2>&1 &")
luci.sys.call("sleep 5")
luci.sys.call("sleep 8")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
end

View File

@ -48,7 +48,7 @@ subscribe_url=($(uci get $name.@server_subscribe[0].subscribe_url))
log_name=${name}_subscribe
for ((o=0;o<${#subscribe_url[@]};o++))
do
subscribe_data=$(wget-ssl --no-check-certificate -T 3 -O- ${subscribe_url[o]})
subscribe_data=$(wget-ssl --user-agent="User-Agent: Mozilla" --no-check-certificate -T 3 -O- ${subscribe_url[o]})
curl_code=$?
if [ $curl_code -eq 0 ];then
ssr_url=($(echo $subscribe_data | base64 -d | sed 's/\r//g')) # 解码数据并删除 \r 换行符