mirror of
https://github.com/tsingui/softcenter-1.git
synced 2024-11-14 09:55:17 +00:00
update ddnspod
This commit is contained in:
parent
2868c936d1
commit
262988f644
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
{
|
||||
"version":"1.2",
|
||||
"md5":"d3b550113999b43294927d3b279a980a",
|
||||
"md5":"51658fc5d42aa4fd2ad0f63ed1e972a0",
|
||||
"home_url":"Module_cfddns.asp",
|
||||
"title":"",
|
||||
"description":"Cloudflare解析自动更新IP",
|
||||
"build_date":"2019-01-13_23:00:27"
|
||||
"build_date":"2019-03-26_11:27:43"
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
1.2 51658fc5d42aa4fd2ad0f63ed1e972a0
|
@ -1,2 +1,2 @@
|
||||
1.2
|
||||
d3b550113999b43294927d3b279a980a
|
||||
51658fc5d42aa4fd2ad0f63ed1e972a0
|
||||
|
@ -53,6 +53,9 @@ arIpAdress() {
|
||||
arNslookup() {
|
||||
local inter="http://119.29.29.29/d?dn="
|
||||
wget --quiet --output-document=- $inter$1
|
||||
if [ $? != 0 ]; then
|
||||
curl --silent $inter$1
|
||||
fi
|
||||
}
|
||||
|
||||
# 读取接口数据
|
||||
@ -66,6 +69,9 @@ arApiPost() {
|
||||
local param="login_token=${arToken}&format=json&${2}"
|
||||
fi
|
||||
wget --quiet --no-check-certificate --output-document=- --user-agent=$agent --post-data $param $inter
|
||||
if [ $? != 0 ]; then
|
||||
curl --silent -X POST -H 'charset=UTF-8;' --user-agent "$agent" --data "$param" $inter
|
||||
fi
|
||||
}
|
||||
|
||||
# 更新记录信息
|
||||
|
@ -62,24 +62,6 @@ unset_lock(){
|
||||
rm -rf "$LOCK_FILE"
|
||||
}
|
||||
|
||||
detect(){
|
||||
# 检测版本号
|
||||
firmware_version=`nvram get extendno|cut -d "X" -f2|cut -d "-" -f1|cut -d "_" -f1`
|
||||
if [ -f "/usr/bin/versioncmp" ];then
|
||||
firmware_comp=`versioncmp $firmware_version 7.7`
|
||||
else
|
||||
firmware_comp="1"
|
||||
fi
|
||||
|
||||
if [ "$firmware_comp" == "0" -o "$firmware_comp" == "-1" ];then
|
||||
echo_date 检测到$firmware_version固件,支持订阅!
|
||||
else
|
||||
echo_date 订阅功能不支持X7.7以下的固件,当前固件版本$firmware_version,请更新固件!
|
||||
unset lock
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
prepare(){
|
||||
# 0 检测排序
|
||||
seq_nu=`dbus list ssconf_basic_|grep _name_ | cut -d "=" -f1|cut -d "_" -f4|sort -n|wc -l`
|
||||
@ -1049,21 +1031,18 @@ case $ss_online_action in
|
||||
0)
|
||||
# 删除所有节点
|
||||
set_lock
|
||||
detect
|
||||
remove_all
|
||||
unset_lock
|
||||
;;
|
||||
1)
|
||||
# 删除所有订阅节点
|
||||
set_lock
|
||||
detect
|
||||
remove_online
|
||||
unset_lock
|
||||
;;
|
||||
2)
|
||||
# 保存订阅设置但是不订阅
|
||||
set_lock
|
||||
detect
|
||||
local_groups=`dbus list ssconf_basic_|grep group|cut -d "=" -f2|sort -u|wc -l`
|
||||
online_group=`dbus get ss_online_links|base64_decode|sed 's/$/\n/'|sed '/^$/d'|wc -l`
|
||||
echo_date "保存订阅节点成功,现共有 $online_group 组订阅来源,当前节点列表内已经订阅了 $local_groups 组..."
|
||||
@ -1085,7 +1064,6 @@ case $ss_online_action in
|
||||
3)
|
||||
# 订阅节点
|
||||
set_lock
|
||||
detect
|
||||
echo_date "开始订阅"
|
||||
start_update
|
||||
unset_lock
|
||||
@ -1093,7 +1071,6 @@ case $ss_online_action in
|
||||
4)
|
||||
# 通过链接添加ss:// ssr:// vmess://
|
||||
set_lock
|
||||
detect
|
||||
add
|
||||
unset_lock
|
||||
;;
|
||||
|
@ -227,7 +227,7 @@ install_binary(){
|
||||
move_binary(){
|
||||
echo_date "开始替换v2ray二进制文件... "
|
||||
mv /tmp/v2ray/v2ray /jffs/softcenter/bin/v2ray
|
||||
mv /tmp/v2ray/v2ctl /jffs/softcenter/bin/
|
||||
mv /tmp/v2ray/v2ctl /jffs/softcenter/bin/v2ctl
|
||||
chmod +x /jffs/softcenter/bin/v2*
|
||||
V2RAY_LOCAL_VER=`/jffs/softcenter/bin/v2ray -version 2>/dev/null | head -n 1 | cut -d " " -f2`
|
||||
V2RAY_LOCAL_DATE=`/jffs/softcenter/bin/v2ray -version 2>/dev/null | head -n 1 | cut -d " " -f5`
|
||||
|
@ -31,10 +31,10 @@
|
||||
"version": "2.0"
|
||||
},
|
||||
{
|
||||
"build_date": "2019-01-13_23:00:27",
|
||||
"build_date": "2019-03-26_11:27:43",
|
||||
"description": "Cloudflare解析自动更新IP",
|
||||
"home_url": "Module_cfddns.asp",
|
||||
"md5": "d3b550113999b43294927d3b279a980a",
|
||||
"md5": "51658fc5d42aa4fd2ad0f63ed1e972a0",
|
||||
"name": "cfddns",
|
||||
"tar_url": "cfddns/cfddns.tar.gz",
|
||||
"title": "",
|
||||
|
Loading…
Reference in New Issue
Block a user