mirror of
https://github.com/bol-van/zapret.git
synced 2025-01-07 17:00:34 +05:00
wireguard docs: hardcode wg device name to avoid startup fail
This commit is contained in:
parent
ae499efa3a
commit
8942aac19d
@ -387,9 +387,8 @@ ipt PREROUTING -t mangle -i $DEVICE -m conntrack --ctstate NEW -j CONNMARK --set
|
|||||||
--/etc/firewall.zapret.hook.post_up----------------------------
|
--/etc/firewall.zapret.hook.post_up----------------------------
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /opt/zapret/init.d/openwrt/functions
|
|
||||||
|
|
||||||
ZAPRET_NFT_TABLE=zapret
|
ZAPRET_NFT_TABLE=zapret
|
||||||
|
DEVICE=wgvps
|
||||||
|
|
||||||
cat << EOF | nft -f - 2>/dev/null
|
cat << EOF | nft -f - 2>/dev/null
|
||||||
delete chain inet $ZAPRET_NFT_TABLE my_output
|
delete chain inet $ZAPRET_NFT_TABLE my_output
|
||||||
@ -397,9 +396,6 @@ cat << EOF | nft -f - 2>/dev/null
|
|||||||
delete chain inet $ZAPRET_NFT_TABLE my_nat
|
delete chain inet $ZAPRET_NFT_TABLE my_nat
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
network_get_device DEVICE wgvps
|
|
||||||
|
|
||||||
[ -n "$DEVICE" ] &&
|
|
||||||
cat << EOF | nft -f -
|
cat << EOF | nft -f -
|
||||||
add chain inet $ZAPRET_NFT_TABLE my_output { type route hook output priority mangle; }
|
add chain inet $ZAPRET_NFT_TABLE my_output { type route hook output priority mangle; }
|
||||||
flush chain inet $ZAPRET_NFT_TABLE my_output
|
flush chain inet $ZAPRET_NFT_TABLE my_output
|
||||||
|
Loading…
Reference in New Issue
Block a user