~优化小米7000/万兆设备tproxy修复写法,增加开启时提示
~修复others.yaml无法正确合并的bug
~修复禁用配置文件覆写后,启动时报错的bug
This commit is contained in:
juewuy
2023-08-09 21:41:27 +08:00
parent e5e2e873c9
commit 5199d89a38
8 changed files with 23 additions and 11 deletions

View File

@@ -1092,7 +1092,6 @@ clashcfg(){
[ -n "$(iptables -j TPROXY 2>&1 | grep 'on-port')" ] && sup_tp=1
[ -n "$(lsmod | grep '^tun')" ] || ip tuntap &>/dev/null && sup_tun=1
ckcmd nft && sup_nft=1
#[ -n "$(lsmod | grep 'nft_tproxy')" ] && sup_nft=2
echo -----------------------------------------------
echo -e "当前代理模式为:\033[47;30m $redir_mod \033[0mClash核心为\033[47;30m $clashcore \033[0m"
echo -e "\033[33m切换模式后需要手动重启clash服务以生效\033[0m"
@@ -1125,7 +1124,12 @@ clashcfg(){
set_redir_config
elif [ "$num" = 3 ]; then
redir_mod=Tproxy混合
if [ -f /etc/init.d/qca-nss-ecm -a "$systype" = "mi_snapshot" ] ;then
read -p "当前设备的QOS服务与本模式冲突是否禁用相关功能(1/0) > " res
[ "$res" = '1' ] && $clashdir/misnap_init.sh tproxyfix && redir_mod=Tproxy混合
else
redir_mod=Tproxy混合
fi
set_redir_config
elif [ "$num" = 4 ]; then
@@ -1133,7 +1137,12 @@ clashcfg(){
set_redir_config
elif [ "$num" = 5 ]; then
redir_mod=Tproxy模式
if [ -f /etc/init.d/qca-nss-ecm -a "$systype" = "mi_snapshot" ] ;then
read -p "当前设备的QOS服务与本模式冲突是否禁用相关功能(1/0) > " res
[ "$res" = '1' ] && $clashdir/misnap_init.sh tproxyfix && redir_mod=Tproxy模式
else
redir_mod=Tproxy模式
fi
set_redir_config
elif [ "$num" = 6 ]; then