mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 16:01:28 +00:00
~改为统一使用ON/OFF来表示功能开启关闭状态
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
. "$CRASHDIR"/starts/fw_getlanip.sh && getlanip
|
||||
#缺省值
|
||||
[ -z "$macfilter_type" ] && macfilter_type='黑名单'
|
||||
[ -z "$common_ports" ] && common_ports='已开启'
|
||||
[ -z "$common_ports" ] && common_ports='ON'
|
||||
[ -z "$multiport" ] && multiport='22,80,143,194,443,465,587,853,993,995,5222,8080,8443'
|
||||
[ "$common_ports" = "已开启" ] && ports="-m multiport --dports $multiport"
|
||||
[ "$common_ports" = "ON" ] && ports="-m multiport --dports $multiport"
|
||||
[ -z "$redir_mod" ] && [ "$USER" = "root" -o "$USER" = "admin" ] && redir_mod='Redir模式'
|
||||
[ -z "$dns_mod" ] && dns_mod='redir_host'
|
||||
[ -z "$redir_mod" ] && firewall_area='4'
|
||||
@@ -31,7 +31,7 @@
|
||||
[ "$redir_mod" != "Redir模式" ] && ip rule add fwmark $fwmark table $table 2>/dev/null
|
||||
}
|
||||
#添加ipv6路由
|
||||
[ "$ipv6_redir" = "已开启" -a "$firewall_area" -le 3 ] && {
|
||||
[ "$ipv6_redir" = "ON" -a "$firewall_area" -le 3 ] && {
|
||||
[ "$redir_mod" = "Tproxy模式" ] && ip -6 route add local default dev lo table $((table + 1)) 2>/dev/null
|
||||
[ -n "$(ip route list | grep utun)" ] && ip -6 route add default dev utun table $((table + 1)) 2>/dev/null
|
||||
[ "$redir_mod" != "Redir模式" ] && ip -6 rule add fwmark $fwmark table $((table + 1)) 2>/dev/null
|
||||
|
||||
Reference in New Issue
Block a user