luci-app-clash: bump to 1.6.8

This commit is contained in:
CN_SZTL 2020-04-06 03:15:52 +08:00
parent 02a5aa2c14
commit cd546e3123
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
8 changed files with 106 additions and 927 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-clash
PKG_VERSION:=1.6.7
PKG_VERSION:=1.6.8
PKG_MAINTAINER:=frainzy1477

View File

@ -103,7 +103,7 @@ end
btnist.write=function(a,t)
luci.sys.exec(string.format('uci set clash.config.config_update_name="%s"',e[t].name))
luci.sys.exec('uci commit clash')
luci.sys.exec('bash /usr/share/clash/update.sh >>/tmp/clash.txt 2>&1 &')
luci.sys.exec('bash /usr/share/clash/update.sh >>/usr/share/clash/clash.txt 2>&1 &')
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "clash"))
end

View File

@ -37,12 +37,12 @@ config_type=$(uci get clash.config.config_type 2>/dev/null)
[ -z "$(grep -w "/usr/share/clash/kill_watchdog.sh" $CRON_FILE)" ] && echo "*/1 * * * * /usr/share/clash/kill_watchdog.sh" >> $CRON_FILE
clear=$(uci get clash.config.auto_clear_log 2>/dev/null)
if [ "${clear}" -eq 1 ]; then
[ -z "$(grep -w "/usr/share/clash/clash.txt" $CRON_FILE)" ] && echo "0 */$(uci get clash.config.clear_time 2>/dev/null) * * * echo '' >/usr/share/clash/clash.txt" >> $CRON_FILE
[ -z "$(grep -w "/usr/share/clash/clash.txt" $CRON_FILE)" ] && echo "* */$(uci get clash.config.clear_time 2>/dev/null) * * * echo '' >/usr/share/clash/clash.txt" >> $CRON_FILE
fi
auto=$(uci get clash.config.auto_update 2>/dev/null)
if [ "${auto}" -eq 1 ]; then
[ -z "$(grep -w "/usr/share/clash/update_all.sh" $CRON_FILE)" ] && echo "0 */$(uci get clash.config.auto_update_time 2>/dev/null) * * * /usr/share/clash/update_all.sh" >> $CRON_FILE
[ -z "$(grep -w "/usr/share/clash/update_all.sh" $CRON_FILE)" ] && echo "* */$(uci get clash.config.auto_update_time 2>/dev/null) * * * bash /usr/share/clash/update_all.sh >/usr/share/clash/clash.txt 2>&1 &" >> $CRON_FILE
fi
auto_geoip=$(uci get clash.config.auto_update_geoip 2>/dev/null)

View File

@ -1,4 +1,4 @@
rules:
Rule:
# (GlobalTV)
# > ABC
- DOMAIN-SUFFIX,edgedatg.com,📺GlobalTV

View File

@ -156,7 +156,7 @@ fi
if [ -f $PROVIDER_FILE ];then
sed -i "1i\ " $PROVIDER_FILE 2>/dev/null
sed -i "2i\proxy-providers:" $PROVIDER_FILE 2>/dev/null
sed -i "2i\proxy-provider:" $PROVIDER_FILE 2>/dev/null
#echo "proxy-provider:" >$PROVIDER_FILE
rm -rf /tmp/Proxy_Provider
@ -559,7 +559,7 @@ if [ ! -z "${scount}" ] || [ "${scount}" -ne 0 ];then
sed -i "1i\ " $SERVER_FILE 2>/dev/null
sed -i "2i\proxies:" $SERVER_FILE 2>/dev/null
sed -i "2i\Proxy:" $SERVER_FILE 2>/dev/null
egrep '^ {0,}-' $SERVER_FILE |grep name: |awk -F 'name: ' '{print $2}' |sed 's/,.*//' >$Proxy_Group 2>&1
@ -700,7 +700,7 @@ config_foreach yml_groups_set "groups"
if [ "$(ls -l $GROUP_FILE|awk '{print $5}')" -ne 0 ]; then
sed -i "1i\ " $GROUP_FILE 2>/dev/null
sed -i "2i\proxy-groups:" $GROUP_FILE 2>/dev/null
sed -i "2i\Proxy Group:" $GROUP_FILE 2>/dev/null
fi

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,7 @@ if [ $type == "ssr2clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" $url -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://ssrsub2clashr.herokuapp.com/ssrsub2clash?sub=$url" -O 2>&1 >1 $CONFIG_YAML
if [ "$?" -eq "0" ]; then
@ -113,7 +113,7 @@ if [ $type == "v2clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" $url -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://tgbot.lbyczf.com/v2rayn2clash?url=$url" -O 2>&1 >1 $CONFIG_YAML
if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
@ -134,4 +134,9 @@ fi
count_nums=$(( $count_nums + 1))
done
sleep 2
if [ "$c_type" -eq 1 ];then
if pidof clash >/dev/null; then
/etc/init.d/clash restart 2>/dev/null
fi
fi