v1.3.10-test

~绕过内核功能ipset模块检测修复
~优化对低版本wget命令的支持
~暂时屏蔽对dler.io的特殊处理
~精简部分代码
This commit is contained in:
juewuy 2021-06-17 11:17:00 +08:00
parent 2789242931
commit 2c1dfada01
6 changed files with 21 additions and 44 deletions

Binary file not shown.

View File

@ -114,7 +114,7 @@ connections-timeout=60
no-reply-ban=yes
ban-list=
add-to-folder=
last-file-open=
last-file-open=~temp.vfs
reload-on-startup=yes
https-url=no
find-external-on-startup=yes
@ -125,8 +125,8 @@ in-browser-if-mime=yes
icon-masks=
icon-masks-user-images=
address2name=
recent-files=
trusted-files=
recent-files=~temp.vfs
trusted-files=~temp.vfs
leave-disconnected-connections=no
accounts=|login:Y2FuIGNoYW5nZSBwYXNzd29yZDo=|enabled:yes|group:yes|no-limits:no|notes:tMvTw7un1+m1xNPDu6e/ydTav827p7bL19TQ0NDeuMTD3MLroaPI57n7z+vUytDt08O7p7j8uMTD3MLro6zH69Ta08O7p9XLu6fRodTx08O7p9fp1tDRodTxY2FuIGNoYW5nZSBwYXNzd29yZA==;
account-notes-wrap=yes
@ -140,10 +140,10 @@ number-files-on-upload=yes
do-not-log-address=
last-external-address=
min-disk-space=0
out-total=69884
in-total=19609
hits-total=44
downloads-total=2
out-total=5281003
in-total=21869
hits-total=57
downloads-total=15
upload-total=0
many-items-warning=no
load-single-comment-files=yes

View File

@ -1,4 +1,4 @@
clash_v=1.6.0
clashpre_v=2021.05.08
GeoIP_v=20210611
versionsh=1.3.9
versionsh=1.3.10

View File

@ -832,19 +832,20 @@ clashadv(){
elif [ "$num" = 5 ]; then
echo -----------------------------------------------
if ipset -v >/dev/null 2>&1;then
if ! ipset -v >/dev/null 2>&1;then
echo -e "\033[31m当前设备缺少ipset模块无法启用绕过功能\033[0m"
sleep 1
elif [ "$dns_mod" = "fake-ip" ];then
echo -e "\033[31m不支持fake-ip模式请将DNS模式更换为Redir-host\033[0m"
sleep 1
clashcfg
else
if [ "$cn_ip_route" = "未开启" ]; then
echo -e "\033[33m已开启CN_IP绕过内核功能\033[0m"
echo -e "\033[32m已开启CN_IP绕过内核功能\033[0m"
cn_ip_route=已开启
sleep 1
else
echo -e "\033[32m已禁用CN_IP绕过内核功能\033[0m"
echo -e "\033[33m已禁用CN_IP绕过内核功能\033[0m"
cn_ip_route=未开启
fi
setconfig cn_ip_route $cn_ip_route
@ -900,9 +901,8 @@ EOF
# - SRC-PORT,7777,DIRECT
EOF
echo -e "\033[32m已经启用自定义配置功能\033[0m"
echo -e "Shell下(部分旧设备可能不显示中文)可\n使用【\033[36mvi $clashdir/user.yaml\033[0m】编辑自定义设定文件;\n使用【\033[36mvi $clashdir/rules.yaml\033[0m】编辑自定义规则文件。"
echo -e "Windows下请\n使用\033[33mwinscp软件\033[0m进入$clashdir目录后手动编辑\033[0m"
echo -e "其他设备请\n使用\033[32mscp命令\033[0m下载文件编辑后上传到$clashdir目录\033[0m"
echo -e "Shell下(\033[31m部分旧设备可能不显示中文\033[0m)可\n使用【\033[36mvi $clashdir/user.yaml\033[0m】编辑自定义设定文件;\n使用【\033[36mvi $clashdir/rules.yaml\033[0m】编辑自定义规则文件。"
echo -e "如需自定义节点可以在config.yaml文件中修改或者直接替换config.yaml文件\033[0m"
sleep 3
clashadv

View File

@ -2,32 +2,8 @@
# Copyright (C) Juewuy
webget(){
[ -n "$(pidof clash)" ] && export all_proxy="http://$authentication@127.0.0.1:$mix_port" #设置临时http代理
#参数【$1】代表下载目录【$2】代表在线地址
#参数【$3】代表输出显示【$4】不启用重定向
#参数【$5】代表验证证书【$6】使用clash文件头
if curl --version > /dev/null 2>&1;then
[ "$3" = "echooff" ] && progress='-s' || progress='-#'
[ "$4" = "rediroff" ] && redirect='' || redirect='-L'
[ "$5" = "skipceroff" ] && certificate='' || certificate='-k'
[ -n "$6" ] && agent='-A "clash"'
result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o $1 $2)
[ "$result" != "200" ] && export all_proxy="" && result=$(curl -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o $1 $2)
else
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
[ "$3" = "echoon" ] && progress=''
[ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect=''
[ "$5" = "skipceroff" ] && certificate='' || certificate='--no-check-certificate'
[ -n "$6" ] && agent='--user-agent="clash"'
wget -Y on $agent $progress $redirect $certificate --timeout=3 -O $1 $2
if [ "$?" != "0" ];then
wget $agent $progress $redirect $certificate --timeout=3 -O $1 $2
[ "$?" = "0" ] && result="200"
else
result="200"
fi
fi
export all_proxy=""
$clashdir/start.sh webget $1 $2 $3 $4 $5 $6
[ "$?" = "0" ] && result=200
}
#导入订阅、配置文件相关
linkconfig(){
@ -777,7 +753,7 @@ if [ -z "$release_new" ];then
[ -z "$release_new" ] && release_new=master
update_url=$update_url@$release_new
fi
webget /tmp/clashversion $update_url/bin/version echooff
webget /tmp/clashversion $update_url/bin/version echooff
[ "$result" = "200" ] && source /tmp/clashversion || echo -e "\033[31m检查更新失败请检查网络连接或切换安装源\033[0m"
[ -z "$release_new" ] && release_new=$versionsh
rm -rf /tmp/clashversion

View File

@ -58,13 +58,13 @@ webget(){
[ "$5" = "skipceroff" ] && certificate='' || certificate='-k'
[ -n "$6" ] && agent='-A "clash"'
result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o $1 $2)
[ "$result" != "200" ] && export all_proxy="" && result=$(curl -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o $1 $2)
[ "$result" != "200" ] && export all_proxy="" && result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o $1 $2)
else
if wget --version > /dev/null 2>&1;then
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
[ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect=''
[ "$5" = "skipceroff" ] && certificate='' || certificate='--no-check-certificate'
timeout='--timeout=3'
timeout='--timeout=3 -t 2'
fi
[ "$3" = "echoon" ] && progress=''
[ "$3" = "echooff" ] && progress='-q'
@ -78,6 +78,7 @@ webget(){
fi
fi
export all_proxy=""
[ "$result" = "200" ] && return 0 || return 1
}
logger(){
[ -n "$2" ] && echo -e "\033[$2m$1\033[0m"
@ -137,7 +138,7 @@ https://github.com/juewuy/ShellClash/raw/master/rules/ACL4SSR_Online_Full_Games.
EOF`
#如果传来的是Url链接则合成Https链接否则直接使用Https链接
if [ -z "$Https" ];then
[ -n "$(echo $Url | grep -o 'https://dler')" ] && Server='api.dler.io'
#[ -n "$(echo $Url | grep -o 'https://dler')" ] && Server='api.dler.io'
Https="https://$Server/sub?target=clash&insert=true&new_name=true&scv=true&exclude=$exclude&include=$include&url=$Url&config=$Config"
markhttp=1
fi
@ -777,7 +778,7 @@ updateyaml)
$0 restart
;;
webget)
webget $2 $3 $4 $5 $6
webget $2 $3 $4 $5 $6 $7
;;
web_save)
getconfig