~优化内核下载检测机制
~替换shellclash.ga为shellclash.cf域名
This commit is contained in:
juewuy
2022-06-04 13:31:52 +08:00
parent 703b87afc7
commit 57368d1311
6 changed files with 23 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ linkserver(){
echo -e "\033[32m感谢以下作者的无私奉献\033[0m"
echo 当前使用后端为:$server_link
echo 1 api.dler.io (墙洞提供)
echo 2 sub.shellclash.ga (作者提供)
echo 2 sub.shellclash.cf (作者提供)
echo 3 sub.xeton.dev SUB作者T大提供
echo 4 sub.id9.cc (品云提供)
echo 5 sub.maoxiongnet.com (猫熊提供)
@@ -452,12 +452,19 @@ getcore(){
$clashdir/start.sh webget /tmp/clash.new $corelink
if [ "$?" = "1" ];then
echo -e "\033[31m核心文件下载失败\033[0m"
rm -rf /tmp/clash.new
else
echo -e "\033[32m$clashcore核心下载成功\033[0m"
mv -f /tmp/clash.new $bindir/clash
chmod 777 $bindir/clash #授予权限
setconfig clashcore $clashcore
setconfig clashv $version
chmod -x /tmp/clash.new && /tmp/clash.new -v >/dev/null 2>&1
if [ "$?" != 0 ];then
echo -e "\033[31m核心文件下载失败\033[0m"
rm -rf /tmp/clash.new
else
echo -e "\033[32m$clashcore核心下载成功\033[0m"
mv -f /tmp/clash.new $bindir/clash
chmod -x $bindir/clash
setconfig clashcore $clashcore
setconfig clashv $version
fi
fi
}
setcore(){
@@ -776,7 +783,7 @@ setserver(){
release_url=''
saveserver
elif [ "$num" = 4 ]; then
update_url='https://gh.shellclash.ga/master'
update_url='https://gh.shellclash.cf/master'
release_url=''
saveserver
elif [ "$num" = 5 ]; then
@@ -788,7 +795,7 @@ setserver(){
release_url=''
saveserver
elif [ "$num" = 7 ]; then
update_url='http://test.shellclash.ga'
update_url='http://test.shellclash.cf'
release_url=''
saveserver
elif [ "$num" = 8 ]; then

View File

@@ -137,7 +137,7 @@ getyaml(){
#前后端订阅服务器地址索引,可在此处添加!
Server=`sed -n ""$server_link"p"<<EOF
https://api.dler.io
https://sub.shellclash.ga
https://sub.shellclash.cf
https://sub.xeton.dev
https://sub.id9.cc
https://sub.maoxiongnet.com
@@ -164,7 +164,7 @@ EOF`
Https=$(echo ${Https//\%26/\&}) #将%26替换回&
#如果传来的是Url链接则合成Https链接否则直接使用Https链接
if [ -z "$Https" ];then
[ -n "$(echo $Url | grep -o 'vless')" ] && Server='https://sub.shellclash.ga'
[ -n "$(echo $Url | grep -o 'vless')" ] && Server='https://sub.shellclash.cf'
Https="$Server/sub?target=clash&insert=true&new_name=true&scv=true&udp=true&exclude=$exclude&include=$include&url=$Url&config=$Config"
url_type=true
fi
@@ -756,8 +756,6 @@ bfstart(){
[ ! -d $bindir/ui ] && mkdir -p $bindir/ui
update_url=https://ghproxy.com/https://raw.githubusercontent.com/juewuy/ShellClash/master
#检查clash核心
$bindir/clash -v >/dev/null 2>&1
[ "$?" != 0 ] && rm -rf $bindir/clash
if [ ! -f $bindir/clash ];then
if [ -f $clashdir/clash ];then
mv $clashdir/clash $bindir/clash && chmod +x $bindir/clash