From d5b1bfa0f57c0b4f2c1c0e45253e1549f659ca13 Mon Sep 17 00:00:00 2001 From: juewuy Date: Fri, 2 Oct 2020 09:16:12 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.0beta11=20~=E5=90=8C=E6=AD=A5=E6=9C=80?= =?UTF-8?q?=E6=96=B0GeoIP=E6=95=B0=E6=8D=AE=E5=BA=93=20~=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5=E5=90=8E=E4=BE=9D=E7=84=B6?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9C=8D=E5=8A=A1=E5=90=AF=E5=8A=A8=E7=9A=84?= =?UTF-8?q?bug=20~=E5=B1=8F=E8=94=BD=E7=BB=8F=E5=B8=B8=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=9A=84netstat=E5=91=BD=E4=BB=A4=E6=8F=90=E7=A4=BA=20~?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8A=82=E7=82=B9=E9=93=BE=E6=8E=A5=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=8A=9F=E8=83=BD=20~=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=AE=BE=E5=A4=87=E5=BC=80=E5=90=AFipv6=E5=90=8E?= =?UTF-8?q?=E9=80=A0=E6=88=90dns=E6=B1=A1=E6=9F=93=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20~=E4=BF=AE=E5=A4=8Dcdn=E6=9B=B4=E6=96=B0=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=88=96=E6=A0=B8=E5=BF=83=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/clash.sh | 4 ++-- scripts/getdate.sh | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/clash.sh b/scripts/clash.sh index c14e099..3cb15df 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -10,7 +10,7 @@ else [ -z $host ] && host=127.0.0.1 fi #服务器地址 -[ -z "$update_url" ] && update_url=https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master +[ -z "$update_url" ] && update_url=https://cdn.jsdelivr.net/gh/juewuy/ShellClash #文件路径 [ -z "$clashdir" ] && clashdir=$(dirname $(readlink -f "$0")) && echo "export clashdir=\"$clashdir\"" >> /etc/profile ccfg=$clashdir/mark @@ -635,7 +635,7 @@ update(){ if [ -z "$release_new" ];then echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[33m正在检查更新!\033[0m" - if [ "$update_url" = "https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master" ];then + if [ "$update_url" = "https://cdn.jsdelivr.net/gh/juewuy/ShellClash" ];then release_new=$(curl -kfsSL --resolve api.github.com:443:140.82.113.5 --connect-timeout 3 -m 3 "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 diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 5e6ea92..a5b53b3 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -300,7 +300,7 @@ if [ "$res" = '1' ]; then fi } getcore(){ -source $ccfg +#source $ccfg #获取核心及版本信息 if [ ! -f $clashdir/clash ]; then clashcore=没有安装核心! @@ -325,7 +325,7 @@ echo -e "当前clash核心:\033[47;30m $clashcore \033[46;30m$clashv\033[0m" echo -e "\033[32m请选择需要下载的核心版本!\033[0m" echo ----------------------------------------------- echo "1 clash: 稳定,内存占用小,推荐!" -echo "(官方正式版) 不支持Tun模式" +echo "(官方正式版) 不支持Tun模式、混合模式" echo echo "2 clashpre: 支持Tun模式、混合模式" echo "(高级预览版) 内存占用更高" @@ -400,7 +400,7 @@ fi getgeo(){ echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[33m正在检查更新!\033[0m" -echo $update_url +#echo $update_url result=$(curl -w %{http_code} -skLo /tmp/clashversion $update_url/bin/version) [ "$result" != "200" ] && echo "检查更新失败!" && exit 1 source /tmp/clashversion @@ -535,8 +535,8 @@ echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -e "\033[30;47m您可以在此处切换在线更新时使用的资源地址\033[0m" echo -e "当前源:\033[4;32m$update_url\033[0m" echo ----------------------------------------------- -echo -e " 1 Github源(使用host指定IP)" -echo -e " 2 CDN源(仅同步最新release版本)" +echo -e " 1 Github源(直连美国服务器)" +echo -e " 2 Jsdelivr-CDN源(仅同步最新release版本)" echo -e " 3 Github源+clash代理(需开启clash服务)" echo -e " 4 自定义输入(请务必确保路径正确)" echo -e " 0 返回上级菜单" @@ -548,7 +548,7 @@ if [ -z $num ]; then elif [[ $num == 1 ]]; then update_url='--resolve raw.githubusercontent.com:443:199.232.68.133 https://raw.githubusercontent.com/juewuy/ShellClash/master' elif [[ $num == 2 ]]; then - update_url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' + update_url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash' elif [[ $num == 3 ]]; then update_url='-x 127.0.0.1:7890 https://raw.githubusercontent.com/juewuy/ShellClash/master' elif [[ $num == 4 ]]; then