diff --git a/bin/ShellClash.tar.gz b/bin/ShellClash.tar.gz index 873fbc7..aa5b1d3 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 abd51ec..7a1684d 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/version b/bin/version index b866750..5fd5e50 100644 --- a/bin/version +++ b/bin/version @@ -2,5 +2,5 @@ clashnet_v=v1.7.6 clashpre_v=2022.11.25 clash_v=v1.7.1 meta_v=v1.14.4 -versionsh=1.7.6c GeoIP_v=20230429 +versionsh=1.7.7 diff --git a/install.sh b/install.sh index 65151cb..3c9de41 100644 --- a/install.sh +++ b/install.sh @@ -135,6 +135,7 @@ if [ -n "$systype" ];then exit 1 ;; esac } + [ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt else $echo " 1 在\033[32m/etc目录\033[0m下安装(适合root用户)" $echo " 2 在\033[32m/usr/share目录\033[0m下安装(适合Linux系统)" @@ -198,6 +199,8 @@ echo ----------------------------------------------- [ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start' } [ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备 +[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备 + #检查root权限 if [ "$USER" != "root" -a -z "$systype" ];then echo 当前用户:$USER diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 8d53334..c884b33 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -1166,16 +1166,18 @@ testcommand(){ iptables -t nat -L OUTPUT --line-numbers iptables -t nat -L clash_out --line-numbers } - [ -n "$(echo $redir_mod | grep -E 'Tproxy模式|混合模式|Tun模式')" -a "$ipv6_redir" = "已开启" ] && { - echo ----------------Tun/Tproxy------------------- - ip6tables -t mangle -L PREROUTING --line-numbers - ip6tables -t mangle -L clashv6 --line-numbers + [ "$ipv6_redir" = "已开启" ] && { [ -n "$(lsmod | grep 'ip6table_nat')" ] && { echo -------------------Redir--------------------- ip6tables -t nat -L PREROUTING --line-numbers ip6tables -t nat -L clashv6_dns --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 exit; diff --git a/scripts/init.sh b/scripts/init.sh index d59a45e..7cfd823 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) Juewuy -version=1.7.6c +version=1.7.7 setdir(){ dir_avail(){ @@ -74,6 +74,7 @@ if [ -n "$systype" ];then exit 1 ;; esac } + [ "$systype" = "ng_snapshot" ] && dir=/tmp/mnt else echo -e "\033[33m安装ShellClash至少需要预留约1MB的磁盘空间\033[0m" 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' } [ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备 +[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备 #检查环境变量 [ -z "$clashdir" -a -d /tmp/SC_tmp ] && { @@ -206,8 +208,8 @@ fi chmod a+rx $initdir 2>/dev/null setconfig initdir $initdir } -#小米镜像化OpenWrt额外设置 -if [ "$systype" = "mi_snapshot" ];then +#镜像化OpenWrt(snapshot)额外设置 +if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then chmod 755 $clashdir/misnap_init.sh uci set firewall.ShellClash=include uci set firewall.ShellClash.type='script'