mirror of
https://github.com/bol-van/zapret2.git
synced 2026-03-14 06:13:09 +00:00
init.d: custom scripts replace spaces with tabs
This commit is contained in:
@@ -42,7 +42,7 @@ zapret_custom_daemons()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
check_std_intersect || return
|
check_std_intersect || return
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ zapret_custom_firewall()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
check_std_intersect || return
|
check_std_intersect || return
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ zapret_custom_daemons()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local f uf4 uf6
|
local f uf4 uf6
|
||||||
local first_packet_only="$ipt_connbytes 1:1"
|
local first_packet_only="$ipt_connbytes 1:1"
|
||||||
@@ -28,7 +28,7 @@ zapret_custom_firewall()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local f
|
local f
|
||||||
local first_packet_only="$nft_connbytes 1"
|
local first_packet_only="$nft_connbytes 1"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ zapret_custom_daemons()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local DISABLE_IPV6=1
|
local DISABLE_IPV6=1
|
||||||
local port_range=$(replace_char - : $DISCORD_MEDIA_PORT_RANGE)
|
local port_range=$(replace_char - : $DISCORD_MEDIA_PORT_RANGE)
|
||||||
@@ -27,7 +27,7 @@ zapret_custom_firewall()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local DISABLE_IPV6=1
|
local DISABLE_IPV6=1
|
||||||
local f="udp dport $DISCORD_MEDIA_PORT_RANGE udp length == 82 @ih,0,32 0x00010046 @ih,64,128 0x00000000000000000000000000000000 @ih,192,128 0x00000000000000000000000000000000 @ih,320,128 0x00000000000000000000000000000000 @ih,448,128 0x00000000000000000000000000000000"
|
local f="udp dport $DISCORD_MEDIA_PORT_RANGE udp length == 82 @ih,0,32 0x00010046 @ih,64,128 0x00000000000000000000000000000000 @ih,192,128 0x00000000000000000000000000000000 @ih,320,128 0x00000000000000000000000000000000 @ih,448,128 0x00000000000000000000000000000000"
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ zapret_custom_daemons()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local f='-p udp -m u32 --u32'
|
local f='-p udp -m u32 --u32'
|
||||||
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=264:65535&&0>>22&0x3C@8>>28=0xC&&0>>22&0x3C@9=0x00000001" "$f 44>>16=264:65535&&48>>28=0xC&&49=0x00000001" $QNUM_QUIC4ALL
|
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=264:65535&&0>>22&0x3C@8>>28=0xC&&0>>22&0x3C@9=0x00000001" "$f 44>>16=264:65535&&48>>28=0xC&&49=0x00000001" $QNUM_QUIC4ALL
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local f="udp length >= 264 @ih,0,4 0xC @ih,8,32 0x00000001"
|
local f="udp length >= 264 @ih,0,4 0xC @ih,8,32 0x00000001"
|
||||||
nft_fw_nfqws_post "$f" "$f" $QNUM_QUIC4ALL
|
nft_fw_nfqws_post "$f" "$f" $QNUM_QUIC4ALL
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ zapret_custom_daemons()
|
|||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local f='-p udp -m u32 --u32'
|
local f='-p udp -m u32 --u32'
|
||||||
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=28:65535&&0>>22&0x3C@12=0x2112A442&&0>>22&0x3C@8&0xC0000003=0" "$f 44>>16=28:65535&&52=0x2112A442&&48&0xC0000003=0" $QNUM_STUN4ALL
|
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=28:65535&&0>>22&0x3C@12=0x2112A442&&0>>22&0x3C@8&0xC0000003=0" "$f 44>>16=28:65535&&52=0x2112A442&&48&0xC0000003=0" $QNUM_STUN4ALL
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local f="udp length >= 28 @ih,32,32 0x2112A442 @ih,0,2 0 @ih,30,2 0"
|
local f="udp length >= 28 @ih,32,32 0x2112A442 @ih,0,2 0 @ih,30,2 0"
|
||||||
nft_fw_nfqws_post "$f" "$f" $QNUM_STUN4ALL
|
nft_fw_nfqws_post "$f" "$f" $QNUM_STUN4ALL
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ zapret_custom_daemons()
|
|||||||
# size = 156 (8 udp header + 148 payload) && payload starts with 0x01000000
|
# size = 156 (8 udp header + 148 payload) && payload starts with 0x01000000
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local f='-p udp -m u32 --u32'
|
local f='-p udp -m u32 --u32'
|
||||||
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=0x9c&&0>>22&0x3C@8=0x01000000" "$f 44>>16=0x9c&&48=0x01000000" $QNUM_WG4ALL
|
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=0x9c&&0>>22&0x3C@8=0x01000000" "$f 44>>16=0x9c&&48=0x01000000" $QNUM_WG4ALL
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local f="udp length 156 @ih,0,32 0x01000000"
|
local f="udp length 156 @ih,0,32 0x01000000"
|
||||||
nft_fw_nfqws_post "$f" "$f" $QNUM_WG4ALL
|
nft_fw_nfqws_post "$f" "$f" $QNUM_WG4ALL
|
||||||
|
|||||||
Reference in New Issue
Block a user