v1.5.5
~全面适配ax6s等小米镜像化系统设备 ·支持procd守护进程 ·支持设置开机启动 ·支持自动开启SSH及备份还原SSH秘钥 ~重做小米SSH工具,现在支持各类小米路由设备软件固化SSH(待测试) ~重写自启逻辑,现在支持Padavan、梅林开关开机启动功能 ~同步最新版本数据库文件 ~同步最新版本Dashboard面板 ~修复流媒体预解析功能相关bug
This commit is contained in:
Binary file not shown.
@@ -2,5 +2,5 @@ clashnet_v=v1.7.6
|
|||||||
clashpre_v=2021.09.15
|
clashpre_v=2021.09.15
|
||||||
clash_v=v1.7.1
|
clash_v=v1.7.1
|
||||||
meta_v=develop-76dcceb
|
meta_v=develop-76dcceb
|
||||||
versionsh=1.5.5
|
|
||||||
GeoIP_v=202203160303
|
GeoIP_v=202203160303
|
||||||
|
versionsh=1.5.5
|
||||||
|
|||||||
@@ -1201,8 +1201,7 @@ tools(){
|
|||||||
tools
|
tools
|
||||||
|
|
||||||
elif [ "$num" = 4 ]; then
|
elif [ "$num" = 4 ]; then
|
||||||
nslookup baidu.com > /dev/null 2>&1
|
if type nslookup > /dev/null 2>&1;then
|
||||||
if [ "$?" = 0 ];then
|
|
||||||
checkcfg=$(cat $ccfg)
|
checkcfg=$(cat $ccfg)
|
||||||
streaming
|
streaming
|
||||||
if [ -n "$PID" ];then
|
if [ -n "$PID" ];then
|
||||||
@@ -1211,7 +1210,7 @@ tools(){
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo "当前设备缺少nslookup命令,无法启用全媒体预解析功能!"
|
echo "当前设备缺少nslookup命令,无法启用流媒体预解析功能!"
|
||||||
echo "Centos请尝试使用以下命令安装【yum -y install bind-utils】"
|
echo "Centos请尝试使用以下命令安装【yum -y install bind-utils】"
|
||||||
echo "Debian/Ubuntu等请尝试使用【sudo apt-get install dnsutils -y】"
|
echo "Debian/Ubuntu等请尝试使用【sudo apt-get install dnsutils -y】"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ getconfig(){
|
|||||||
[ -z "$db_port" ] && db_port=9999
|
[ -z "$db_port" ] && db_port=9999
|
||||||
[ -z "$restore" ] && restore=false
|
[ -z "$restore" ] && restore=false
|
||||||
[ -z "$dns_port" ] && dns_port=1053
|
[ -z "$dns_port" ] && dns_port=1053
|
||||||
[ -z "$stearming_int" ] && stearming_int=24
|
[ -z "$streaming_int" ] && streaming_int=24
|
||||||
[ -z "$dns_nameserver" ] && dns_nameserver='114.114.114.114, 223.5.5.5'
|
[ -z "$dns_nameserver" ] && dns_nameserver='114.114.114.114, 223.5.5.5'
|
||||||
[ -z "$dns_fallback" ] && dns_fallback='1.0.0.1, 8.8.4.4'
|
[ -z "$dns_fallback" ] && dns_fallback='1.0.0.1, 8.8.4.4'
|
||||||
[ -z "$multiport" ] && multiport='22,53,587,465,995,993,143,80,443,8080'
|
[ -z "$multiport" ] && multiport='22,53,587,465,995,993,143,80,443,8080'
|
||||||
@@ -82,7 +82,7 @@ mark_time(){
|
|||||||
sed -i '/start_time*/'d $clashdir/mark
|
sed -i '/start_time*/'d $clashdir/mark
|
||||||
echo start_time=$start_time >> $clashdir/mark
|
echo start_time=$start_time >> $clashdir/mark
|
||||||
}
|
}
|
||||||
steaming(){
|
streaming(){
|
||||||
getconfig
|
getconfig
|
||||||
#设置循环检测clashDNS端口
|
#设置循环检测clashDNS端口
|
||||||
ns_type=$(nslookup -version 2>&1 | grep -io busybox)
|
ns_type=$(nslookup -version 2>&1 | grep -io busybox)
|
||||||
@@ -98,26 +98,26 @@ steaming(){
|
|||||||
i=$?
|
i=$?
|
||||||
j=$((j+1))
|
j=$((j+1))
|
||||||
done
|
done
|
||||||
steaming_dns(){
|
streaming_dns(){
|
||||||
steaming_dir=$clashdir/steaming/${steaming_type}_Domains.list
|
streaming_dir=$clashdir/streaming/${streaming_type}_Domains.list
|
||||||
if [ ! -f "$steaming_dir" ];then
|
rm -rf $clashdir/steaming
|
||||||
echo 未找到$steaming_type域名数据库,正在下载!
|
if [ ! -s "$streaming_dir" ];then
|
||||||
mkdir -p $clashdir/steaming
|
echo 未找到$streaming_type域名数据库,正在下载!
|
||||||
$0 webget "$steaming_dir" "$update_url/bin/${steaming_type}_Domains.list"
|
mkdir -p $clashdir/streaming
|
||||||
[ "$?" = "1" ] && logger "$steaming_type数据库文件下载失败"
|
$0 webget "$streaming_dir" "$update_url/bin/${streaming_type}_Domains.list"
|
||||||
|
[ "$?" = "1" ] && logger "$streaming_type数据库文件下载失败"
|
||||||
fi
|
fi
|
||||||
if [ -f "$steaming_dir" ];then
|
if [ -f "$streaming_dir" ];then
|
||||||
for line in $(cat $steaming_dir);do
|
for line in $(cat $streaming_dir);do
|
||||||
[ -n "$line" ] && ns_lookup "$line"
|
[ -n "$line" ] && ns_lookup "$line"
|
||||||
done >/dev/null 2>&1
|
done >/dev/null 2>&1
|
||||||
echo "$steaming_type域名预解析完成!"
|
echo "$streaming_type域名预解析完成!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
echo
|
|
||||||
echo "正在后台进行流媒体预解析服务,请耐心等待!"
|
echo "正在后台进行流媒体预解析服务,请耐心等待!"
|
||||||
[ "$netflix_pre" = "已开启" ] && steaming_type=Netflix && steaming_dns
|
[ "$netflix_pre" = "已开启" ] && streaming_type=Netflix && streaming_dns
|
||||||
[ "$disneyP_pre" = "已开启" ] && steaming_type=Disney_Plus && steaming_dns
|
[ "$disneyP_pre" = "已开启" ] && streaming_type=Disney_Plus && streaming_dns
|
||||||
echo "请输入回车继续!"
|
echo "请输入回车以继续!"
|
||||||
}
|
}
|
||||||
autoSSH(){
|
autoSSH(){
|
||||||
#自动开启SSH
|
#自动开启SSH
|
||||||
@@ -797,17 +797,18 @@ afstart(){
|
|||||||
#设置本机代理
|
#设置本机代理
|
||||||
[ "$local_proxy" = "已开启" ] && $0 set_proxy $mix_port $db_port
|
[ "$local_proxy" = "已开启" ] && $0 set_proxy $mix_port $db_port
|
||||||
#加载定时任务
|
#加载定时任务
|
||||||
[ -f $clashdir/cron ] && croncmd $clashdir/cron
|
[ -f $clashdir/cron ] && croncmd $clashdir/cron
|
||||||
#流媒体预解析
|
|
||||||
if [ "$netflix_pre" = "已开启" -o "$disneyP_pre" = "已开启" ];then
|
|
||||||
cronset '#ShellClash流媒体预解析' "* */$stearming_int * * * $clashdir/start.sh steaming #ShellClash流媒体预解析"
|
|
||||||
$0 steaming & #后台执行流媒体预解析进程
|
|
||||||
fi
|
|
||||||
#启用面板配置自动保存
|
#启用面板配置自动保存
|
||||||
cronset '#每10分钟保存节点配置' "*/10 * * * * test -n \"\$(pidof clash)\" && $clashdir/start.sh web_save #每10分钟保存节点配置"
|
cronset '#每10分钟保存节点配置' "*/10 * * * * test -n \"\$(pidof clash)\" && $clashdir/start.sh web_save #每10分钟保存节点配置"
|
||||||
[ -f $clashdir/web_save ] && web_restore & #后台还原面板配置
|
[ -f $clashdir/web_save ] && web_restore & #后台还原面板配置
|
||||||
#自动开启SSH
|
#自动开启SSH
|
||||||
[ "$mi_autoSSH" = "已启用" ] && autoSSH 2>/dev/null
|
[ "$mi_autoSSH" = "已启用" ] && autoSSH 2>/dev/null
|
||||||
|
#流媒体预解析
|
||||||
|
if [ "$netflix_pre" = "已开启" -o "$disneyP_pre" = "已开启" ];then
|
||||||
|
cronset '#ShellClash流媒体预解析' "* */$streaming_int * * * test -n \"\$(pidof clash)\" && $clashdir/start.sh streaming #ShellClash流媒体预解析"
|
||||||
|
sleep 1
|
||||||
|
$0 streaming & #后台执行流媒体预解析进程
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
logger "clash服务启动失败!请查看报错信息!" 31
|
logger "clash服务启动失败!请查看报错信息!" 31
|
||||||
$bindir/clash -t -d $bindir
|
$bindir/clash -t -d $bindir
|
||||||
@@ -825,7 +826,7 @@ start_old(){
|
|||||||
$nohup $bindir/clash -d $bindir >/dev/null 2>&1 &
|
$nohup $bindir/clash -d $bindir >/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
afstart
|
afstart
|
||||||
[ -z "$(crontab -l | grep ShellClash初始化)" ] && $0 daemon
|
$0 daemon
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -967,8 +968,8 @@ unset_proxy)
|
|||||||
sed -i '/all_proxy/'d $profile
|
sed -i '/all_proxy/'d $profile
|
||||||
sed -i '/ALL_PROXY/'d $profile
|
sed -i '/ALL_PROXY/'d $profile
|
||||||
;;
|
;;
|
||||||
steaming)
|
streaming)
|
||||||
steaming
|
streaming
|
||||||
;;
|
;;
|
||||||
db)
|
db)
|
||||||
$2
|
$2
|
||||||
|
|||||||
Reference in New Issue
Block a user