diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index af1f85e..140e94d 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/scripts/clash.sh b/scripts/clash.sh index 25cc8be..a46641a 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -635,11 +635,13 @@ update(){ if [ -z "$release_new" ];then echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[33m正在检查更新!\033[0m" - release_new=$(curl -kfsSL --resolve api.github.com:443:140.82.113.5 "https://api.github.com/repos/juewuy/ShellClash/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') + if [ "$update_url" = "https://cdn.jsdelivr.net/gh/juewuy/ShellClash" ];then + release_new=$(curl -kfsSL --resolve api.github.com:443:140.82.113.5 "https://api.github.com/repos/juewuy/ShellClash/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') + update_url=$update_url@$release_new + fi [ -z "$release_new" ] && release_new=$(curl -kfsSL $update_url/bin/version | grep "versionsh" | awk -F "=" '{print $2}') [ -z "$release_new" ] && echo "检查更新失败!" fi -[ "$update_url" = "https://cdn.jsdelivr.net/gh/juewuy/ShellClash" ] && update_url=$update_url@$release_new echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[30;47m欢迎使用更新功能:\033[0m" [ -n "$release_new" ] && echo -e "当前ShellClash版本:\033[33m $versionsh_l \033[0m" diff --git a/scripts/getdate.sh b/scripts/getdate.sh index b4f48e7..a1cf188 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -513,7 +513,7 @@ echo -e "\033[30;47m您可以在此处切换在线更新时使用的资源地址 echo -e "当前源:\033[4;32m$update_url\033[0m" echo ----------------------------------------------- echo -e " 1 Github源(使用host指定IP)" -echo -e " 2 CDN源(版本同步较慢)" +echo -e " 2 CDN源(仅同步最新release版本)" echo -e " 3 Github源+clash代理(需开启clash服务)" echo -e " 4 自定义输入(请务必确保路径正确)" echo -e " 0 返回上级菜单"