v1.7.10h
~优化小米7000/万兆设备tproxy修复写法,增加开启时提示 ~修复others.yaml无法正确合并的bug ~修复禁用配置文件覆写后,启动时报错的bug
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,4 +3,4 @@ clashpre_v=2022.11.25
|
|||||||
clash_v=v1.7.1
|
clash_v=v1.7.1
|
||||||
meta_v=v1.15.0
|
meta_v=v1.15.0
|
||||||
GeoIP_v=20230805
|
GeoIP_v=20230805
|
||||||
versionsh=1.7.10g
|
versionsh=1.7.10h
|
||||||
|
|||||||
@@ -1092,7 +1092,6 @@ clashcfg(){
|
|||||||
[ -n "$(iptables -j TPROXY 2>&1 | grep 'on-port')" ] && sup_tp=1
|
[ -n "$(iptables -j TPROXY 2>&1 | grep 'on-port')" ] && sup_tp=1
|
||||||
[ -n "$(lsmod | grep '^tun')" ] || ip tuntap &>/dev/null && sup_tun=1
|
[ -n "$(lsmod | grep '^tun')" ] || ip tuntap &>/dev/null && sup_tun=1
|
||||||
ckcmd nft && sup_nft=1
|
ckcmd nft && sup_nft=1
|
||||||
#[ -n "$(lsmod | grep 'nft_tproxy')" ] && sup_nft=2
|
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "当前代理模式为:\033[47;30m $redir_mod \033[0m;Clash核心为:\033[47;30m $clashcore \033[0m"
|
echo -e "当前代理模式为:\033[47;30m $redir_mod \033[0m;Clash核心为:\033[47;30m $clashcore \033[0m"
|
||||||
echo -e "\033[33m切换模式后需要手动重启clash服务以生效!\033[0m"
|
echo -e "\033[33m切换模式后需要手动重启clash服务以生效!\033[0m"
|
||||||
@@ -1125,7 +1124,12 @@ clashcfg(){
|
|||||||
set_redir_config
|
set_redir_config
|
||||||
|
|
||||||
elif [ "$num" = 3 ]; then
|
elif [ "$num" = 3 ]; then
|
||||||
|
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混合
|
redir_mod=Tproxy混合
|
||||||
|
fi
|
||||||
set_redir_config
|
set_redir_config
|
||||||
|
|
||||||
elif [ "$num" = 4 ]; then
|
elif [ "$num" = 4 ]; then
|
||||||
@@ -1133,7 +1137,12 @@ clashcfg(){
|
|||||||
set_redir_config
|
set_redir_config
|
||||||
|
|
||||||
elif [ "$num" = 5 ]; then
|
elif [ "$num" = 5 ]; then
|
||||||
|
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模式
|
redir_mod=Tproxy模式
|
||||||
|
fi
|
||||||
set_redir_config
|
set_redir_config
|
||||||
|
|
||||||
elif [ "$num" = 6 ]; then
|
elif [ "$num" = 6 ]; then
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
version=1.7.10g
|
version=1.7.10h
|
||||||
|
|
||||||
setdir(){
|
setdir(){
|
||||||
dir_avail(){
|
dir_avail(){
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ tunfix(){
|
|||||||
#将tun.ko链接到lib
|
#将tun.ko链接到lib
|
||||||
ln -sf $clashdir/tools/tun.ko ${ko_dir}/tun.ko
|
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(){
|
init(){
|
||||||
#等待启动完成
|
#等待启动完成
|
||||||
log_file=$(uci get system.@system[0].log_file)
|
log_file=$(uci get system.@system[0].log_file)
|
||||||
@@ -59,10 +64,7 @@ init(){
|
|||||||
#AX6S/AX6000修复tun功能
|
#AX6S/AX6000修复tun功能
|
||||||
[ -f $clashdir/configs/tun.ko ] && tunfix
|
[ -f $clashdir/configs/tun.ko ] && tunfix
|
||||||
#小米7000/小米万兆修复tproxy
|
#小米7000/小米万兆修复tproxy
|
||||||
[ -f /etc/init.d/qca-nss-ecm ] && {
|
[ -f /etc/init.d/qca-nss-ecm ] && [ -n "$(grep 'redir_mod=Tproxy' $clashdir/configs/ShellClash.cfg )" ] && tproxyfix
|
||||||
[ -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
|
|
||||||
}
|
|
||||||
#启动服务
|
#启动服务
|
||||||
/etc/init.d/clash start
|
/etc/init.d/clash start
|
||||||
/etc/init.d/clash enable
|
/etc/init.d/clash enable
|
||||||
@@ -71,6 +73,7 @@ init(){
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
tunfix) tunfix ;;
|
tunfix) tunfix ;;
|
||||||
|
tproxyfix) tproxyfix ;;
|
||||||
init) init ;;
|
init) init ;;
|
||||||
*)
|
*)
|
||||||
if [ -z $(pidof clash) ];then
|
if [ -z $(pidof clash) ];then
|
||||||
|
|||||||
@@ -452,7 +452,7 @@ EOF
|
|||||||
}
|
}
|
||||||
[ -s $TMPDIR/dns.yaml ] && yaml_dns=$TMPDIR/dns.yaml
|
[ -s $TMPDIR/dns.yaml ] && yaml_dns=$TMPDIR/dns.yaml
|
||||||
[ -s $TMPDIR/hosts.yaml ] && yaml_hosts=$TMPDIR/hosts.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=
|
yaml_add=
|
||||||
for char in $yaml_char;do #将额外配置文件合并
|
for char in $yaml_char;do #将额外配置文件合并
|
||||||
[ -s $TMPDIR/${char}.yaml ] && {
|
[ -s $TMPDIR/${char}.yaml ] && {
|
||||||
@@ -1226,7 +1226,7 @@ bfstart(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#生成配置文件
|
#生成配置文件
|
||||||
[ "$disoverride" != "1" ] && modify_yaml || ln -s $yaml $bindir/config.yaml
|
[ "$disoverride" != "1" ] && modify_yaml || ln -sf $yaml $bindir/config.yaml
|
||||||
}
|
}
|
||||||
afstart(){
|
afstart(){
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user