diff --git a/scripts/getdate.sh b/scripts/getdate.sh index da7bfb3..6e8b64a 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -463,11 +463,11 @@ setcore(){ echo "2 clashpre: 支持Tun模式、混合模式" echo "(高级预览版) 内存占用更高" echo - echo "3 clash.net: 支持vless/xtls" + echo "3 clash.net: 支持部分vless协议" echo "(.net定制版) 第三方定制内核" echo - echo "4 clash.meta:支持vless/xtls" - echo "(meta定制版) 需要额外4M空间占用" + echo "4 clash.meta:支持大部分vless协议" + echo "(meta定制版) 第三方定制内核" echo echo "5 手动指定处理器架构" echo ----------------------------------------------- diff --git a/scripts/start.sh b/scripts/start.sh index a53de9a..1d2be64 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -135,7 +135,7 @@ EOF` yaml=$clashdir/config.yaml yamlnew=/tmp/clash_config_$USER.yaml rm -rf $yamlnew - $0 webget $yamlnew $Https 0 0 0 1 + $0 webget $yamlnew $Https if [ "$?" = "1" ];then if [ -z "$markhttp" ];then echo ----------------------------------------------- @@ -190,8 +190,16 @@ EOF` echo ----------------------------------------------- exit 1 fi + #检测vless协议 + if [ -n "$(cat $yamlnew | grep -E 'vless')" ] && [ "$clashcore" = "clash" -o "$clashcore" = "clashpre" ];then + echo ----------------------------------------------- + logger "检测到vless协议!将改为使用clash.meta核心启动!" 33 + rm -rf $bindir/clash + setconfig clashcore clash.meta + echo ----------------------------------------------- + fi #检测是否存在高级版规则 - if [ "$clashcore" = "clash" -a -n "$(cat $yamlnew | grep -E '^script:|proxy-providers|rule-providers|vless')" ];then + if [ "$clashcore" = "clash" -a -n "$(cat $yamlnew | grep -E '^script:|proxy-providers|rule-providers')" ];then echo ----------------------------------------------- logger "检测到高级版核心专属规则!将改为使用clash.net核心启动!" 33 rm -rf $bindir/clash @@ -832,7 +840,7 @@ webget) [ "$6" = "skipceroff" ] && certificate='' || certificate='-k' #[ -n "$7" ] && agent='-A "clash"' result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o "$2" "$3") - [ "$?" != "0" ] && export all_proxy="" && result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o "$2" "$3") + [ "$result" != "200" ] && export all_proxy="" && result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o "$2" "$3") else if wget --version > /dev/null 2>&1;then [ "$4" = "echooff" ] && progress='-q' || progress='-q --show-progress'