v1.7.7
~适配部分网件NETGEAR固件设备 ~修复部分情况下测试菜单查看防火墙规则时ipv6规则显示缺失的问题
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -2,5 +2,5 @@ clashnet_v=v1.7.6
|
|||||||
clashpre_v=2022.11.25
|
clashpre_v=2022.11.25
|
||||||
clash_v=v1.7.1
|
clash_v=v1.7.1
|
||||||
meta_v=v1.14.4
|
meta_v=v1.14.4
|
||||||
versionsh=1.7.6c
|
|
||||||
GeoIP_v=20230429
|
GeoIP_v=20230429
|
||||||
|
versionsh=1.7.7
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ if [ -n "$systype" ];then
|
|||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
[ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt
|
||||||
else
|
else
|
||||||
$echo " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
$echo " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
||||||
$echo " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)"
|
$echo " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)"
|
||||||
@@ -198,6 +199,8 @@ echo -----------------------------------------------
|
|||||||
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
||||||
}
|
}
|
||||||
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
|
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
|
||||||
|
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
|
||||||
|
|
||||||
#检查root权限
|
#检查root权限
|
||||||
if [ "$USER" != "root" -a -z "$systype" ];then
|
if [ "$USER" != "root" -a -z "$systype" ];then
|
||||||
echo 当前用户:$USER
|
echo 当前用户:$USER
|
||||||
|
|||||||
@@ -1166,16 +1166,18 @@ testcommand(){
|
|||||||
iptables -t nat -L OUTPUT --line-numbers
|
iptables -t nat -L OUTPUT --line-numbers
|
||||||
iptables -t nat -L clash_out --line-numbers
|
iptables -t nat -L clash_out --line-numbers
|
||||||
}
|
}
|
||||||
[ -n "$(echo $redir_mod | grep -E 'Tproxy模式|混合模式|Tun模式')" -a "$ipv6_redir" = "已开启" ] && {
|
[ "$ipv6_redir" = "已开启" ] && {
|
||||||
echo ----------------Tun/Tproxy-------------------
|
|
||||||
ip6tables -t mangle -L PREROUTING --line-numbers
|
|
||||||
ip6tables -t mangle -L clashv6 --line-numbers
|
|
||||||
[ -n "$(lsmod | grep 'ip6table_nat')" ] && {
|
[ -n "$(lsmod | grep 'ip6table_nat')" ] && {
|
||||||
echo -------------------Redir---------------------
|
echo -------------------Redir---------------------
|
||||||
ip6tables -t nat -L PREROUTING --line-numbers
|
ip6tables -t nat -L PREROUTING --line-numbers
|
||||||
ip6tables -t nat -L clashv6_dns --line-numbers
|
ip6tables -t nat -L clashv6_dns --line-numbers
|
||||||
ip6tables -t nat -L clashv6 --line-numbers
|
ip6tables -t nat -L clashv6 --line-numbers
|
||||||
}
|
}
|
||||||
|
[ -n "$(echo $redir_mod | grep -E 'Tproxy模式|混合模式|Tun模式')" ] && {
|
||||||
|
echo ----------------Tun/Tproxy-------------------
|
||||||
|
ip6tables -t mangle -L PREROUTING --line-numbers
|
||||||
|
ip6tables -t mangle -L clashv6 --line-numbers
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
version=1.7.6c
|
version=1.7.7
|
||||||
|
|
||||||
setdir(){
|
setdir(){
|
||||||
dir_avail(){
|
dir_avail(){
|
||||||
@@ -74,6 +74,7 @@ if [ -n "$systype" ];then
|
|||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
[ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt
|
||||||
else
|
else
|
||||||
echo -e "\033[33m安装ShellClash至少需要预留约1MB的磁盘空间\033[0m"
|
echo -e "\033[33m安装ShellClash至少需要预留约1MB的磁盘空间\033[0m"
|
||||||
echo -e " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
echo -e " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)"
|
||||||
@@ -139,6 +140,7 @@ $clashdir/start.sh stop 2>/dev/null #防止进程冲突
|
|||||||
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
|
||||||
}
|
}
|
||||||
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
|
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
|
||||||
|
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
|
||||||
|
|
||||||
#检查环境变量
|
#检查环境变量
|
||||||
[ -z "$clashdir" -a -d /tmp/SC_tmp ] && {
|
[ -z "$clashdir" -a -d /tmp/SC_tmp ] && {
|
||||||
@@ -206,8 +208,8 @@ fi
|
|||||||
chmod a+rx $initdir 2>/dev/null
|
chmod a+rx $initdir 2>/dev/null
|
||||||
setconfig initdir $initdir
|
setconfig initdir $initdir
|
||||||
}
|
}
|
||||||
#小米镜像化OpenWrt额外设置
|
#镜像化OpenWrt(snapshot)额外设置
|
||||||
if [ "$systype" = "mi_snapshot" ];then
|
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then
|
||||||
chmod 755 $clashdir/misnap_init.sh
|
chmod 755 $clashdir/misnap_init.sh
|
||||||
uci set firewall.ShellClash=include
|
uci set firewall.ShellClash=include
|
||||||
uci set firewall.ShellClash.type='script'
|
uci set firewall.ShellClash.type='script'
|
||||||
|
|||||||
Reference in New Issue
Block a user