Compare commits

..

No commits in common. "09378553b9f006551c142c6320fc3be217054a02" and "1b14a8210ce8e871104845a373e4e95b2b582161" have entirely different histories.

View File

@ -8,15 +8,12 @@ zapret_custom_firewall()
{ {
# $1 - 1 - add, 0 - stop # $1 - 1 - add, 0 - stop
local wan wanif rule local wan wanif
[ "$DISABLE_IPV4" = "1" ] || { # use IFACE_WAN if defined. if not - search for interfaces with default route.
# use IFACE_WAN if defined. if not - search for interfaces with default route. 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)}
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)} for wan in $wanif; do
for wan in $wanif; do ipt_print_op $1 "-o $wan -j MASQUERADE" "keenetic udp fix"
rule="-o $wan -p udp -m mark --mark $DESYNC_MARK/$DESYNC_MARK" ipt_add_del $1 POSTROUTING -t nat -o $wan -j MASQUERADE
ipt_print_op $1 "$rule" "keenetic udp fix" done
ipt_add_del $1 POSTROUTING -t nat $rule -j MASQUERADE
done
}
} }