diff --git a/bin/ShellClash.tar.gz b/bin/ShellClash.tar.gz index 3c1ac68..8f2a793 100644 Binary files a/bin/ShellClash.tar.gz and b/bin/ShellClash.tar.gz differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index 291060e..caf8873 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/public.tar.gz b/bin/public.tar.gz index d006e4f..5ed3086 100644 Binary files a/bin/public.tar.gz and b/bin/public.tar.gz differ diff --git a/bin/version b/bin/version index 36894a5..26ebbc3 100644 --- a/bin/version +++ b/bin/version @@ -3,4 +3,4 @@ clashpre_v=2022.11.25 clash_v=v1.7.1 meta_v=v1.15.0 GeoIP_v=20230805 -versionsh=1.7.10g +versionsh=1.7.10h diff --git a/scripts/clash.sh b/scripts/clash.sh index ee757f0..444bac1 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -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[0m;Clash核心为:\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 diff --git a/scripts/init.sh b/scripts/init.sh index 1e924b9..40d43b9 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) Juewuy -version=1.7.10g +version=1.7.10h setdir(){ dir_avail(){ diff --git a/scripts/misnap_init.sh b/scripts/misnap_init.sh index d5dea0b..ed5d165 100644 --- a/scripts/misnap_init.sh +++ b/scripts/misnap_init.sh @@ -36,6 +36,11 @@ tunfix(){ #将tun.ko链接到lib ln -sf $clashdir/tools/tun.ko ${ko_dir}/tun.ko } +tproxyfix(){ + sed -i 's/sysctl -w net.bridge.bridge-nf-call-ip/#sysctl -w net.bridge.bridge-nf-call-ip/g' /etc/init.d/qca-nss-ecm + sysctl -w net.bridge.bridge-nf-call-iptables=0 + sysctl -w net.bridge.bridge-nf-call-ip6tables=0 +} init(){ #等待启动完成 log_file=$(uci get system.@system[0].log_file) @@ -59,10 +64,7 @@ init(){ #AX6S/AX6000修复tun功能 [ -f $clashdir/configs/tun.ko ] && tunfix #小米7000/小米万兆修复tproxy - [ -f /etc/init.d/qca-nss-ecm ] && { - [ -f /proc/sys/net/bridge/bridge-nf-call-iptables ] && sysctl -w net.bridge.bridge-nf-call-iptables=0 - [ -f /proc/sys/net/bridge/bridge-nf-call-ip6tables ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=0 - } + [ -f /etc/init.d/qca-nss-ecm ] && [ -n "$(grep 'redir_mod=Tproxy' $clashdir/configs/ShellClash.cfg )" ] && tproxyfix #启动服务 /etc/init.d/clash start /etc/init.d/clash enable @@ -71,6 +73,7 @@ init(){ case "$1" in tunfix) tunfix ;; + tproxyfix) tproxyfix ;; init) init ;; *) if [ -z $(pidof clash) ];then diff --git a/scripts/start.sh b/scripts/start.sh index 72cb407..a8f03ed 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -452,7 +452,7 @@ EOF } [ -s $TMPDIR/dns.yaml ] && yaml_dns=$TMPDIR/dns.yaml [ -s $TMPDIR/hosts.yaml ] && yaml_hosts=$TMPDIR/hosts.yaml - [ -s $TMPDIR/others.yaml ] && yaml_others=$clashdir/yamls/others.yaml + [ -s $clashdir/yamls/others.yaml ] && yaml_others=$clashdir/yamls/others.yaml yaml_add= for char in $yaml_char;do #将额外配置文件合并 [ -s $TMPDIR/${char}.yaml ] && { @@ -1226,7 +1226,7 @@ bfstart(){ fi fi #生成配置文件 - [ "$disoverride" != "1" ] && modify_yaml || ln -s $yaml $bindir/config.yaml + [ "$disoverride" != "1" ] && modify_yaml || ln -sf $yaml $bindir/config.yaml } afstart(){