mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 12:10:53 +03:00
keenetic script check disable ipv4
This commit is contained in:
parent
6b85884cdf
commit
09378553b9
@ -10,11 +10,13 @@ zapret_custom_firewall()
|
|||||||
|
|
||||||
local wan wanif rule
|
local wan wanif rule
|
||||||
|
|
||||||
# use IFACE_WAN if defined. if not - search for interfaces with default route.
|
[ "$DISABLE_IPV4" = "1" ] || {
|
||||||
wanif=${IFACE_WAN:-$(sed -nre 's/^([^\t]+)\t00000000\t[0-9A-F]{8}\t[0-9A-F]{4}\t[0-9]+\t[0-9]+\t[0-9]+\t00000000.*$/\1/p' /proc/net/route | sort -u | xargs)}
|
# use IFACE_WAN if defined. if not - search for interfaces with default route.
|
||||||
for wan in $wanif; do
|
wanif=${IFACE_WAN:-$(sed -nre 's/^([^\t]+)\t00000000\t[0-9A-F]{8}\t[0-9A-F]{4}\t[0-9]+\t[0-9]+\t[0-9]+\t00000000.*$/\1/p' /proc/net/route | sort -u | xargs)}
|
||||||
rule="-o $wan -p udp -m mark --mark $DESYNC_MARK/$DESYNC_MARK"
|
for wan in $wanif; do
|
||||||
ipt_print_op $1 "$rule" "keenetic udp fix"
|
rule="-o $wan -p udp -m mark --mark $DESYNC_MARK/$DESYNC_MARK"
|
||||||
ipt_add_del $1 POSTROUTING -t nat $rule -j MASQUERADE
|
ipt_print_op $1 "$rule" "keenetic udp fix"
|
||||||
done
|
ipt_add_del $1 POSTROUTING -t nat $rule -j MASQUERADE
|
||||||
|
done
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user