Skip to content

Commit 7c07c51

Browse files
committed
v1.7.0f
~优化手动上传内核及配置文件读取,修复bug ~NTP地址替换为阿里云纯IP,以适配部分老旧设备
1 parent ef1fd70 commit 7c07c51

File tree

6 files changed

+20
-11
lines changed

6 files changed

+20
-11
lines changed

bin/ShellClash.tar.gz

62 Bytes
Binary file not shown.

bin/clashfm.tar.gz

74 Bytes
Binary file not shown.

bin/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ clashpre_v=2022.11.25
33
clash_v=v1.7.1
44
meta_v=v1.13.2
55
GeoIP_v=20230128
6-
versionsh=1.7.0e
6+
versionsh=1.7.0f

scripts/clash.sh

+17-8
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ ckstatus(){
9898
#检查执行权限
9999
[ ! -x $clashdir/start.sh ] && chmod +x $clashdir/start.sh
100100
#检查/tmp内核文件
101-
for file in `ls -F /tmp | grep -v [/\$] | grep -iE '^clash$|^clash-linux*'` ; do
101+
for file in `ls -F /tmp | grep -v [/\$] | grep -v '\ ' | grep -iE '^clash$|^clash-linux*'` ; do
102+
file=/tmp/$file
102103
chmod +x $file
103104
tmp_version=$($file -v 2>/dev/null)
104105
if [ -n "$tmp_version" ];then
105-
echo -e "\033[32m发现可用的内核文件\033[0m"
106+
echo -e "发现可用的内核文件: \033[36m$file\033[0m "
106107
read -p "是否加载?(1/0) > " res
107108
[ "$res" = 1 ] && {
108109
echo -e " 1 Clash内核"
@@ -114,7 +115,7 @@ ckstatus(){
114115
3) clashcore=clash.meta ;;
115116
*) clashcore=clash ;;
116117
esac
117-
mv -f $file $bindir/clash
118+
mv -f $file $bindir/clash && echo -e "\033[32m内核加载完成!\033[0m " && sleep 1
118119
setconfig clashcore $clashcore
119120
}
120121
else
@@ -127,13 +128,21 @@ ckstatus(){
127128
done
128129
#检查/tmp配置文件
129130
[ -x $bindir/clash ] && \
130-
for file in `ls -F /tmp | grep -v [/\$] | grep -iE '.yaml$|.yml$'` ; do
131+
for file in `ls -F /tmp | grep -v [/\$] | grep -v '\ ' | grep -iE '.yaml$|.yml$'` ; do
132+
file=/tmp/$file
131133
$bindir/clash -t -d $bindir -f $file &>/dev/null && {
132-
echo -e "\033[32m发现可用的YAML配置文件\033[0m"
133-
echo $file
134+
echo -e "发现可用的YAML配置文件: \033[36m$file\033[0m "
134135
read -p "加载为config.yaml配置文件/或者移除该文件?(1/0) > " res
135-
[ "$res" = 1 ] && mv -f $file $clashdir/config.yaml
136-
[ "$res" = 0 ] && rm -rf $file
136+
[ "$res" = 1 ] && {
137+
mv -f $file $clashdir/config.yaml
138+
echo -e "\033[32m配置文件加载完成!\033[0m "
139+
sleep 1
140+
}
141+
[ "$res" = 0 ] && {
142+
rm -rf $file
143+
echo -e "\033[32m配置文件已移除!\033[0m "
144+
sleep 1
145+
}
137146
echo -----------------------------------------------
138147
}
139148
done

scripts/init.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Copyright (C) Juewuy
33

4-
version=1.7.0e
4+
version=1.7.0f
55

66
setdir(){
77
dir_avail(){

scripts/start.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ afstart(){
12341234
[ "$local_proxy" = "已开启" ] && [ "$local_type" = "nftables增强模式" ] && [ "$redir_mod" = "纯净模式" ] && start_nft
12351235
ckcmd iptables && start_wan
12361236
#同步本机时间
1237-
ckcmd ntpd && ntpd -n -q -p ntp.aliyun.com
1237+
ckcmd ntpd && ntpd -n -q -p 203.107.6.88
12381238
#标记启动时间
12391239
mark_time
12401240
#加载定时任务

0 commit comments

Comments
 (0)