v1.3.10-test
~绕过内核功能ipset模块检测修复 ~优化对低版本wget命令的支持 ~暂时屏蔽对dler.io的特殊处理 ~精简部分代码
This commit is contained in:
Binary file not shown.
@@ -114,7 +114,7 @@ connections-timeout=60
|
|||||||
no-reply-ban=yes
|
no-reply-ban=yes
|
||||||
ban-list=
|
ban-list=
|
||||||
add-to-folder=
|
add-to-folder=
|
||||||
last-file-open=
|
last-file-open=~temp.vfs
|
||||||
reload-on-startup=yes
|
reload-on-startup=yes
|
||||||
https-url=no
|
https-url=no
|
||||||
find-external-on-startup=yes
|
find-external-on-startup=yes
|
||||||
@@ -125,8 +125,8 @@ in-browser-if-mime=yes
|
|||||||
icon-masks=
|
icon-masks=
|
||||||
icon-masks-user-images=
|
icon-masks-user-images=
|
||||||
address2name=
|
address2name=
|
||||||
recent-files=
|
recent-files=~temp.vfs
|
||||||
trusted-files=
|
trusted-files=~temp.vfs
|
||||||
leave-disconnected-connections=no
|
leave-disconnected-connections=no
|
||||||
accounts=|login:Y2FuIGNoYW5nZSBwYXNzd29yZDo=|enabled:yes|group:yes|no-limits:no|notes:tMvTw7un1+m1xNPDu6e/ydTav827p7bL19TQ0NDeuMTD3MLroaPI57n7z+vUytDt08O7p7j8uMTD3MLro6zH69Ta08O7p9XLu6fRodTx08O7p9fp1tDRodTxY2FuIGNoYW5nZSBwYXNzd29yZA==;
|
accounts=|login:Y2FuIGNoYW5nZSBwYXNzd29yZDo=|enabled:yes|group:yes|no-limits:no|notes:tMvTw7un1+m1xNPDu6e/ydTav827p7bL19TQ0NDeuMTD3MLroaPI57n7z+vUytDt08O7p7j8uMTD3MLro6zH69Ta08O7p9XLu6fRodTx08O7p9fp1tDRodTxY2FuIGNoYW5nZSBwYXNzd29yZA==;
|
||||||
account-notes-wrap=yes
|
account-notes-wrap=yes
|
||||||
@@ -140,10 +140,10 @@ number-files-on-upload=yes
|
|||||||
do-not-log-address=
|
do-not-log-address=
|
||||||
last-external-address=
|
last-external-address=
|
||||||
min-disk-space=0
|
min-disk-space=0
|
||||||
out-total=69884
|
out-total=5281003
|
||||||
in-total=19609
|
in-total=21869
|
||||||
hits-total=44
|
hits-total=57
|
||||||
downloads-total=2
|
downloads-total=15
|
||||||
upload-total=0
|
upload-total=0
|
||||||
many-items-warning=no
|
many-items-warning=no
|
||||||
load-single-comment-files=yes
|
load-single-comment-files=yes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
clash_v=1.6.0
|
clash_v=1.6.0
|
||||||
clashpre_v=2021.05.08
|
clashpre_v=2021.05.08
|
||||||
GeoIP_v=20210611
|
GeoIP_v=20210611
|
||||||
versionsh=1.3.9
|
versionsh=1.3.10
|
||||||
|
|||||||
@@ -832,19 +832,20 @@ clashadv(){
|
|||||||
|
|
||||||
elif [ "$num" = 5 ]; then
|
elif [ "$num" = 5 ]; then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
if ipset -v >/dev/null 2>&1;then
|
if ! ipset -v >/dev/null 2>&1;then
|
||||||
echo -e "\033[31m当前设备缺少ipset模块,无法启用绕过功能!!\033[0m"
|
echo -e "\033[31m当前设备缺少ipset模块,无法启用绕过功能!!\033[0m"
|
||||||
sleep 1
|
sleep 1
|
||||||
elif [ "$dns_mod" = "fake-ip" ];then
|
elif [ "$dns_mod" = "fake-ip" ];then
|
||||||
echo -e "\033[31m不支持fake-ip模式,请将DNS模式更换为Redir-host!!\033[0m"
|
echo -e "\033[31m不支持fake-ip模式,请将DNS模式更换为Redir-host!!\033[0m"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
clashcfg
|
||||||
else
|
else
|
||||||
if [ "$cn_ip_route" = "未开启" ]; then
|
if [ "$cn_ip_route" = "未开启" ]; then
|
||||||
echo -e "\033[33m已开启CN_IP绕过内核功能!!\033[0m"
|
echo -e "\033[32m已开启CN_IP绕过内核功能!!\033[0m"
|
||||||
cn_ip_route=已开启
|
cn_ip_route=已开启
|
||||||
sleep 1
|
sleep 1
|
||||||
else
|
else
|
||||||
echo -e "\033[32m已禁用CN_IP绕过内核功能!!\033[0m"
|
echo -e "\033[33m已禁用CN_IP绕过内核功能!!\033[0m"
|
||||||
cn_ip_route=未开启
|
cn_ip_route=未开启
|
||||||
fi
|
fi
|
||||||
setconfig cn_ip_route $cn_ip_route
|
setconfig cn_ip_route $cn_ip_route
|
||||||
@@ -900,9 +901,8 @@ EOF
|
|||||||
# - SRC-PORT,7777,DIRECT
|
# - SRC-PORT,7777,DIRECT
|
||||||
EOF
|
EOF
|
||||||
echo -e "\033[32m已经启用自定义配置功能!\033[0m"
|
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 "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"
|
echo -e "如需自定义节点,可以在config.yaml文件中修改或者直接替换config.yaml文件!\033[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
clashadv
|
clashadv
|
||||||
|
|||||||
@@ -2,32 +2,8 @@
|
|||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
webget(){
|
webget(){
|
||||||
[ -n "$(pidof clash)" ] && export all_proxy="http://$authentication@127.0.0.1:$mix_port" #设置临时http代理
|
$clashdir/start.sh webget $1 $2 $3 $4 $5 $6
|
||||||
#参数【$1】代表下载目录,【$2】代表在线地址
|
[ "$?" = "0" ] && result=200
|
||||||
#参数【$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=""
|
|
||||||
}
|
}
|
||||||
#导入订阅、配置文件相关
|
#导入订阅、配置文件相关
|
||||||
linkconfig(){
|
linkconfig(){
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ webget(){
|
|||||||
[ "$5" = "skipceroff" ] && certificate='' || certificate='-k'
|
[ "$5" = "skipceroff" ] && certificate='' || certificate='-k'
|
||||||
[ -n "$6" ] && agent='-A "clash"'
|
[ -n "$6" ] && agent='-A "clash"'
|
||||||
result=$(curl $agent -w %{http_code} --connect-timeout 3 $progress $redirect $certificate -o $1 $2)
|
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
|
else
|
||||||
if wget --version > /dev/null 2>&1;then
|
if wget --version > /dev/null 2>&1;then
|
||||||
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
|
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
|
||||||
[ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect=''
|
[ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect=''
|
||||||
[ "$5" = "skipceroff" ] && certificate='' || certificate='--no-check-certificate'
|
[ "$5" = "skipceroff" ] && certificate='' || certificate='--no-check-certificate'
|
||||||
timeout='--timeout=3'
|
timeout='--timeout=3 -t 2'
|
||||||
fi
|
fi
|
||||||
[ "$3" = "echoon" ] && progress=''
|
[ "$3" = "echoon" ] && progress=''
|
||||||
[ "$3" = "echooff" ] && progress='-q'
|
[ "$3" = "echooff" ] && progress='-q'
|
||||||
@@ -78,6 +78,7 @@ webget(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
export all_proxy=""
|
export all_proxy=""
|
||||||
|
[ "$result" = "200" ] && return 0 || return 1
|
||||||
}
|
}
|
||||||
logger(){
|
logger(){
|
||||||
[ -n "$2" ] && echo -e "\033[$2m$1\033[0m"
|
[ -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`
|
EOF`
|
||||||
#如果传来的是Url链接则合成Https链接,否则直接使用Https链接
|
#如果传来的是Url链接则合成Https链接,否则直接使用Https链接
|
||||||
if [ -z "$Https" ];then
|
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"
|
Https="https://$Server/sub?target=clash&insert=true&new_name=true&scv=true&exclude=$exclude&include=$include&url=$Url&config=$Config"
|
||||||
markhttp=1
|
markhttp=1
|
||||||
fi
|
fi
|
||||||
@@ -777,7 +778,7 @@ updateyaml)
|
|||||||
$0 restart
|
$0 restart
|
||||||
;;
|
;;
|
||||||
webget)
|
webget)
|
||||||
webget $2 $3 $4 $5 $6
|
webget $2 $3 $4 $5 $6 $7
|
||||||
;;
|
;;
|
||||||
web_save)
|
web_save)
|
||||||
getconfig
|
getconfig
|
||||||
|
|||||||
Reference in New Issue
Block a user