~修复小米设备开启自启失败的问题
~修复本机代理nftables增强模式部分情况下无法代理docker流量的问题
~修复本机代理iptables提示重复添加的问题
This commit is contained in:
juewuy
2023-07-31 21:25:11 +08:00
parent d54b6df7f7
commit 4ec7a5dda1
10 changed files with 77 additions and 76 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.7.9f
version=1.7.10c
setdir(){
dir_avail(){
@@ -124,7 +124,7 @@ fi
}
setconfig(){
#参数1代表变量名参数2代表变量值,参数3即文件路径
[ -z "$3" ] && configpath=$clashdir/mark || configpath=$3
[ -z "$3" ] && configpath=$clashdir/configs/ShellClash.cfg || configpath=$3
[ -n "$(grep -E "^${1}=" $configpath)" ] && sed -i "s#^${1}=\(.*\)#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath
}
@@ -151,7 +151,8 @@ mkdir -p $clashdir
mv -f /tmp/SC_tmp/* $clashdir 2>/dev/null
#初始化
[ -f "$clashdir/mark" ] || echo '#ShellClash配置文件不明勿动' > $clashdir/mark
mkdir -p $clashdir/configs
[ -f "$clashdir/configs/ShellClash.cfg" ] || echo '#ShellClash配置文件不明勿动' > $clashdir/configs/ShellClash.cfg
#本地安装跳过新手引导
#[ -z "$url" ] && setconfig userguide 1
#判断系统类型写入不同的启动文件
@@ -231,17 +232,16 @@ rm -rf /tmp/*lash*gz
rm -rf /tmp/SC_tmp
#转换&清理旧版本文件
mkdir -p $clashdir/yamls
mkdir -p $clashdir/configs
mkdir -p $clashdir/tools
for file in config.yaml config.yaml.bak user.yaml proxies.yaml proxy-groups.yaml rules.yaml others.yaml ;do
mv -f $clashdir/$file $clashdir/yamls/$file
mv -f $clashdir/$file $clashdir/yamls/$file 2>/dev/null
done
for file in fake_ip_filter mac web_save servers.list fake_ip_filter.list fallback_filter.list;do
mv -f $clashdir/$file $clashdir/configs/$file
mv -f $clashdir/$file $clashdir/configs/$file 2>/dev/null
done
mv -f $clashdir/mark $clashdir/configs/ShellClash.cfg
for file in dropbear_rsa_host_key authorized_keys tun.ko ShellDDNS.sh;do
mv -f $clashdir/$file $clashdir/tools/$file
mv -f $clashdir/mark $clashdir/configs/ShellClash.cfg 2>/dev/null
for file in cron dropbear_rsa_host_key authorized_keys tun.ko ShellDDNS.sh;do
mv -f $clashdir/$file $clashdir/tools/$file 2>/dev/null
done
for file in log clash.service mark? mark.bak;do
rm -rf $clashdir/$file