mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
Compare commits
No commits in common. "549e5dddeb89d89d7b4aa7b497ae3d2bd1b2fc7f" and "256dc07350d20a34a04b304e43b84af98b8031d9" have entirely different histories.
549e5dddeb
...
256dc07350
@ -6,20 +6,17 @@ zapret_custom_daemons()
|
|||||||
{
|
{
|
||||||
# stop logic is managed by procd
|
# stop logic is managed by procd
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE start_daemons_procd
|
||||||
start_daemons_procd
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
|
||||||
zapret_do_firewall_rules_ipt $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
|
||||||
zapret_apply_firewall_rules_nft
|
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,17 @@ zapret_custom_daemons()
|
|||||||
{
|
{
|
||||||
# stop logic is managed by procd
|
# stop logic is managed by procd
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE start_daemons_procd
|
||||||
start_daemons_procd
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
|
||||||
zapret_do_firewall_rules_ipt $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
|
||||||
zapret_apply_firewall_rules_nft
|
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,17 @@ zapret_custom_daemons()
|
|||||||
{
|
{
|
||||||
# stop logic is managed by procd
|
# stop logic is managed by procd
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE start_daemons_procd
|
||||||
start_daemons_procd
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
|
||||||
zapret_do_firewall_rules_ipt $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
|
||||||
zapret_apply_firewall_rules_nft
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ nfqws_tpws_inheritor()
|
|||||||
{
|
{
|
||||||
# $1 - inherited function
|
# $1 - inherited function
|
||||||
# $2 - 1 - run, 0 - stop
|
# $2 - 1 - run, 0 - stop
|
||||||
local MODE_OVERRIDE
|
|
||||||
[ "$MODE_HTTP" = "1" ] && {
|
[ "$MODE_HTTP" = "1" ] && {
|
||||||
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
|
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ zapret_custom_firewall()
|
|||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local f
|
local f
|
||||||
local first_packets_only="$ipt_connbytes 1:3"
|
local first_packets_only="$ipt_connbytes 1:1"
|
||||||
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
|
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
|
||||||
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
|
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
|
||||||
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
|
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
|
||||||
@ -52,7 +52,7 @@ zapret_custom_firewall_nft()
|
|||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local f
|
local f
|
||||||
local first_packets_only="$nft_connbytes 1-3"
|
local first_packets_only="$nft_connbytes 1"
|
||||||
local desync="mark and $DESYNC_MARK == 0"
|
local desync="mark and $DESYNC_MARK == 0"
|
||||||
local dest_set="ip daddr @$DISCORD_SET_NAME"
|
local dest_set="ip daddr @$DISCORD_SET_NAME"
|
||||||
local subnets
|
local subnets
|
||||||
|
@ -6,20 +6,17 @@ zapret_custom_daemons()
|
|||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1
|
||||||
zapret_do_daemons $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
|
||||||
zapret_do_firewall_rules_ipt $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
|
||||||
zapret_apply_firewall_rules_nft
|
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,17 @@ zapret_custom_daemons()
|
|||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1
|
||||||
zapret_do_daemons $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
|
||||||
zapret_do_firewall_rules_ipt $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
|
||||||
zapret_apply_firewall_rules_nft
|
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,17 @@ zapret_custom_daemons()
|
|||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1
|
||||||
zapret_do_daemons $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall()
|
zapret_custom_firewall()
|
||||||
{
|
{
|
||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
|
||||||
zapret_do_firewall_rules_ipt $1
|
|
||||||
}
|
}
|
||||||
zapret_custom_firewall_nft()
|
zapret_custom_firewall_nft()
|
||||||
{
|
{
|
||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local MODE_OVERRIDE=$OVERRIDE
|
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
|
||||||
zapret_apply_firewall_rules_nft
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ nfqws_tpws_inheritor()
|
|||||||
{
|
{
|
||||||
# $1 - inherited function
|
# $1 - inherited function
|
||||||
# $2 - 1 - run, 0 - stop
|
# $2 - 1 - run, 0 - stop
|
||||||
local MODE_OVERRIDE
|
|
||||||
[ "$MODE_HTTP" = "1" ] && {
|
[ "$MODE_HTTP" = "1" ] && {
|
||||||
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
|
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ zapret_custom_firewall()
|
|||||||
# $1 - 1 - run, 0 - stop
|
# $1 - 1 - run, 0 - stop
|
||||||
|
|
||||||
local f
|
local f
|
||||||
local first_packets_only="$ipt_connbytes 1:3"
|
local first_packets_only="$ipt_connbytes 1:1"
|
||||||
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
|
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
|
||||||
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
|
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
|
||||||
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
|
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
|
||||||
@ -52,7 +52,7 @@ zapret_custom_firewall_nft()
|
|||||||
# stop logic is not required
|
# stop logic is not required
|
||||||
|
|
||||||
local f
|
local f
|
||||||
local first_packets_only="$nft_connbytes 1-3"
|
local first_packets_only="$nft_connbytes 1"
|
||||||
local desync="mark and $DESYNC_MARK == 0"
|
local desync="mark and $DESYNC_MARK == 0"
|
||||||
local dest_set="ip daddr @$DISCORD_SET_NAME"
|
local dest_set="ip daddr @$DISCORD_SET_NAME"
|
||||||
local subnets
|
local subnets
|
||||||
|
Loading…
Reference in New Issue
Block a user