mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
v1.7.1
~更新Meta内核至v1.14.2 ~新手引导内容优化 ~代理常用端口功能说明优化 ~内置加密DNS设置相关bug修复 ~屏蔽Meta内核进程嗅探
This commit is contained in:
parent
21c92117e0
commit
dfa4ba557e
Binary file not shown.
Binary file not shown.
|
@ -2,5 +2,5 @@ clashnet_v=v1.7.6
|
|||
clashpre_v=2022.11.25
|
||||
clash_v=v1.7.1
|
||||
meta_v=v1.14.2
|
||||
versionsh=1.7.0f
|
||||
GeoIP_v=20230225
|
||||
versionsh=1.7.0f
|
||||
|
|
|
@ -516,8 +516,8 @@ setdns(){
|
|||
setdns
|
||||
|
||||
elif [ "$num" = 4 ]; then
|
||||
$clashdir/start.sh webget /tmp/ssl_test https://www.baidu.com echooff rediron skipceroff
|
||||
if [ "$?" = "1" ];then
|
||||
$clashdir/start.sh webget /tmp/ssl_test https://doh.pub echooff rediron
|
||||
if [ "$?" = "1" ];then
|
||||
echo -----------------------------------------------
|
||||
if openssl version >/dev/null 2>&1;then
|
||||
echo -e "\033[31m当前设备缺少本地根证书,请先安装证书!\033[0m"
|
||||
|
@ -1232,15 +1232,23 @@ clashcfg(){
|
|||
clashcfg
|
||||
|
||||
elif [ "$num" = 4 ]; then
|
||||
echo -----------------------------------------------
|
||||
if [ "$common_ports" = "未开启" ]; then
|
||||
echo -e "\033[33m已设为仅代理【$multiport】等常用端口!!\033[0m"
|
||||
common_ports=已开启
|
||||
set_common_ports(){
|
||||
if [ "$common_ports" = "未开启" ]; then
|
||||
echo -e "\033[33m已设为仅代理【$multiport】等常用端口!!\033[0m"
|
||||
common_ports=已开启
|
||||
else
|
||||
echo -e "\033[33m已设为代理全部端口!!\033[0m"
|
||||
common_ports=未开启
|
||||
fi
|
||||
setconfig common_ports $common_ports
|
||||
}
|
||||
echo -----------------------------------------------
|
||||
if [ -n "$(pidof clash)" ];then
|
||||
read -p "切换时将停止clash服务,是否继续?(1/0) > " res
|
||||
[ "$res" = 1 ] && $clashdir/start.sh stop && set_common_ports
|
||||
else
|
||||
echo -e "\033[33m已设为代理全部端口!!\033[0m"
|
||||
common_ports=未开启
|
||||
set_common_ports
|
||||
fi
|
||||
setconfig common_ports $common_ports
|
||||
clashcfg
|
||||
|
||||
elif [ "$num" = 5 ]; then
|
||||
|
|
|
@ -939,14 +939,10 @@ userguide(){
|
|||
errornum
|
||||
forwhat
|
||||
elif [ "$num" = 1 ];then
|
||||
if ckcmd nft;then
|
||||
setconfig redir_mod "Nft模式"
|
||||
else
|
||||
setconfig redir_mod "Redir模式"
|
||||
fi
|
||||
setconfig redir_mod "Redir模式"
|
||||
#设置开机启动
|
||||
[ -f /etc/rc.common ] && /etc/init.d/clash enable
|
||||
ckcmd systemctl && systemctl enable clash.service > /dev/null 2>&1
|
||||
[ "$(pidof systemd)" = 1 ] && systemctl enable clash.service > /dev/null 2>&1
|
||||
rm -rf $clashdir/.dis_startup
|
||||
autostart=enable
|
||||
#检测IP转发
|
||||
|
@ -1000,11 +996,11 @@ userguide(){
|
|||
[ "$res" = 1 ] && setconfig bindir "/tmp/clash_$USER"
|
||||
fi
|
||||
#下载本地面板
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[33m安装本地Dashboard面板,可以更快捷的管理clash内置规则!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
read -p "需要安装本地Dashboard面板吗?(1/0) > " res
|
||||
[ "$res" = 1 ] && checkupdate && setdb
|
||||
# echo -----------------------------------------------
|
||||
# echo -e "\033[33m安装本地Dashboard面板,可以更快捷的管理clash内置规则!\033[0m"
|
||||
# echo -----------------------------------------------
|
||||
# read -p "需要安装本地Dashboard面板吗?(1/0) > " res
|
||||
# [ "$res" = 1 ] && checkupdate && setdb
|
||||
#检测及下载根证书
|
||||
if [ -d /etc/ssl/certs -a ! -f '/etc/ssl/certs/ca-certificates.crt' ];then
|
||||
echo -----------------------------------------------
|
||||
|
@ -1014,7 +1010,7 @@ userguide(){
|
|||
[ "$res" = 1 ] && checkupdate && getcrt
|
||||
fi
|
||||
#设置加密DNS
|
||||
$clashdir/start.sh webget /tmp/ssl_test https://doh.pub echooff rediron skipceroff
|
||||
$clashdir/start.sh webget /tmp/ssl_test https://doh.pub echooff rediron
|
||||
if [ "$?" = "0" ];then
|
||||
dns_nameserver='https://223.5.5.5/dns-query, https://doh.pub/dns-query, tls://dns.rubyfish.cn:853'
|
||||
dns_fallback='https://1.0.0.1/dns-query, https://8.8.4.4/dns-query, https://doh.opendns.com/dns-query'
|
||||
|
@ -1031,7 +1027,7 @@ userguide(){
|
|||
sethost
|
||||
fi
|
||||
}
|
||||
if ckcmd systemd;then
|
||||
if [ "$(pidof systemd)" = 1 ];then
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[32m是否开启公网访问Dashboard面板及socks服务?\033[0m"
|
||||
echo -e "注意当前设备必须有公网IP才能从公网正常访问"
|
||||
|
@ -1058,7 +1054,8 @@ userguide(){
|
|||
#小米设备软固化
|
||||
if [ "$systype" = "mi_snapshot" ];then
|
||||
echo -----------------------------------------------
|
||||
read -p "是否启用软固化SSH?(1/0) > " res
|
||||
echo -e "\033[33m检测到为小米路由设备,启用软固化可防止路由升级后丢失SSH\033[0m"
|
||||
read -p "是否启用软固化功能?(1/0) > " res
|
||||
[ "$res" = 1 ] && setconfig mi_autoSSH 已启用
|
||||
fi
|
||||
#提示导入订阅或者配置文件
|
||||
|
|
|
@ -152,8 +152,8 @@ if [ -f /etc/rc.common ];then
|
|||
cp -f $clashdir/clashservice /etc/init.d/clash
|
||||
chmod 755 /etc/init.d/clash
|
||||
else
|
||||
[ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
|
||||
[ -w /usr/lib/systemd/system ] && sysdir=/usr/lib/systemd/system
|
||||
[ "$(pidof systemd)" = 1 ] && [ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
|
||||
[ "$(pidof systemd)" = 1 ] && [ -w /usr/lib/systemd/system ] && sysdir=/usr/lib/systemd/system
|
||||
if [ -n "$sysdir" ];then
|
||||
#设为systemd方式启动
|
||||
mv -f $clashdir/clash.service $sysdir/clash.service 2>/dev/null
|
||||
|
|
|
@ -100,7 +100,7 @@ croncmd(){
|
|||
[ ! -w "$crondir" ] && crondir="/etc/storage/cron/crontabs"
|
||||
[ ! -w "$crondir" ] && crondir="/var/spool/cron/crontabs"
|
||||
[ ! -w "$crondir" ] && crondir="/var/spool/cron"
|
||||
[ ! -w "$crondir" ] && echo "你的设备不支持定时任务配置,脚本大量功能无法启用,请前往 https://t.me/clashfm 申请适配!"
|
||||
[ ! -w "$crondir" ] && echo "你的设备不支持定时任务配置,脚本大量功能无法启用,请尝试使用搜索引擎查找安装方式!"
|
||||
[ "$1" = "-l" ] && cat $crondir/$USER 2>/dev/null
|
||||
[ -f "$1" ] && cat $1 > $crondir/$USER
|
||||
fi
|
||||
|
@ -306,6 +306,10 @@ modify_yaml(){
|
|||
tun='tun: {enable: false}'
|
||||
fi
|
||||
exper='experimental: {ignore-resolve-fail: true, interface-name: en0}'
|
||||
#Meta内核专属配置
|
||||
[ "$clashcore" = 'clash.meta' ] && {
|
||||
find_process='find-process-mode: "off"'
|
||||
}
|
||||
#dns配置
|
||||
[ -z "$(cat $clashdir/user.yaml 2>/dev/null | grep '^dns:')" ] && {
|
||||
[ "$clashcore" = 'clash.meta' ] && dns_default_meta=', https://1.0.0.1/dns-query, https://223.5.5.5/dns-query'
|
||||
|
@ -379,6 +383,7 @@ $exper
|
|||
$dns
|
||||
$sniffer_set
|
||||
store-selected: $restore
|
||||
$find_process
|
||||
EOF
|
||||
###################################
|
||||
#读取本机hosts并生成配置文件
|
||||
|
|
Loading…
Reference in New Issue
Block a user