diff --git a/openmptcprouter/files/bin/blocklanfw b/openmptcprouter/files/bin/blocklanfw index 56f176c81..1ba1f3c8a 100755 --- a/openmptcprouter/files/bin/blocklanfw +++ b/openmptcprouter/files/bin/blocklanfw @@ -1,6 +1,6 @@ #!/bin/sh -if [ -f /usr/sbin/iptables-legacy ]; then +if [ -e /usr/sbin/iptables-legacy ]; then IPTABLES="/usr/sbin/iptables-legacy" IP6TABLES="/usr/sbin/ip6tables-legacy" IPTABLESSAVE="/usr/sbin/iptables-legacy-save" @@ -89,10 +89,10 @@ v2ray_rules6_fw_drop() { [ -n "$(pgrep blocklanfw)" ] && exit 0 [ -z "$($IPTABLESSAVE 2>/dev/null | grep zone_lan)" ] && exit 0 fw=0 -if [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ]; then +if [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks" ] || [ "$(uci -q get openmptcprouter.settings.proxy)" = "shadowsocks-rust" ]; then ss_rules6_fw_drop ss_rules_fw_drop -elif [ "$(uci -q get openmptcprouter.settings.proxy)" = "v2ray" ]; then +elif [ -n "$(uci -q get openmptcprouter.settings.proxy | grep v2ray)" ] || [ -n "$(uci -q get openmptcprouter.settings.proxy | grep xray)" ]; then v2r_rules_fw_drop v2ray_rules6_fw_drop fi