Compare commits

..

3 Commits

Author SHA1 Message Date
NewUse
5b51716523
Merge branch 'bol-van:master' into tpws-luci 2024-10-24 17:44:28 +03:00
bol-van
2c68d1c94f 50-discord: fool first 3 packets 2024-10-23 16:37:39 +03:00
bol-van
5cd5ab176e custom.d.example old busybox bug workaround 2024-10-22 18:12:12 +03:00
10 changed files with 42 additions and 24 deletions

View File

@ -6,17 +6,20 @@ zapret_custom_daemons()
{
# stop logic is managed by procd
MODE_OVERRIDE=$OVERRIDE start_daemons_procd
local MODE_OVERRIDE=$OVERRIDE
start_daemons_procd
}
zapret_custom_firewall()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_firewall_rules_ipt $1
}
zapret_custom_firewall_nft()
{
# stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
}

View File

@ -6,17 +6,20 @@ zapret_custom_daemons()
{
# stop logic is managed by procd
MODE_OVERRIDE=$OVERRIDE start_daemons_procd
local MODE_OVERRIDE=$OVERRIDE
start_daemons_procd
}
zapret_custom_firewall()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_firewall_rules_ipt $1
}
zapret_custom_firewall_nft()
{
# stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
}

View File

@ -6,17 +6,20 @@ zapret_custom_daemons()
{
# stop logic is managed by procd
MODE_OVERRIDE=$OVERRIDE start_daemons_procd
local MODE_OVERRIDE=$OVERRIDE
start_daemons_procd
}
zapret_custom_firewall()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_firewall_rules_ipt $1
}
zapret_custom_firewall_nft()
{
# stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
}

View File

@ -5,7 +5,7 @@ nfqws_tpws_inheritor()
{
# $1 - inherited function
# $2 - 1 - run, 0 - stop
local MODE_OVERRIDE
[ "$MODE_HTTP" = "1" ] && {
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
}

View File

@ -23,7 +23,7 @@ zapret_custom_firewall()
# $1 - 1 - run, 0 - stop
local f
local first_packets_only="$ipt_connbytes 1:1"
local first_packets_only="$ipt_connbytes 1:3"
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
@ -52,7 +52,7 @@ zapret_custom_firewall_nft()
# stop logic is not required
local f
local first_packets_only="$nft_connbytes 1"
local first_packets_only="$nft_connbytes 1-3"
local desync="mark and $DESYNC_MARK == 0"
local dest_set="ip daddr @$DISCORD_SET_NAME"
local subnets

View File

@ -6,17 +6,20 @@ zapret_custom_daemons()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_daemons $1
}
zapret_custom_firewall()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_firewall_rules_ipt $1
}
zapret_custom_firewall_nft()
{
# stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
}

View File

@ -6,17 +6,20 @@ zapret_custom_daemons()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_daemons $1
}
zapret_custom_firewall()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_firewall_rules_ipt $1
}
zapret_custom_firewall_nft()
{
# stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
}

View File

@ -6,17 +6,20 @@ zapret_custom_daemons()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_daemons $1
}
zapret_custom_firewall()
{
# $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1
local MODE_OVERRIDE=$OVERRIDE
zapret_do_firewall_rules_ipt $1
}
zapret_custom_firewall_nft()
{
# stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft
local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
}

View File

@ -5,7 +5,7 @@ nfqws_tpws_inheritor()
{
# $1 - inherited function
# $2 - 1 - run, 0 - stop
local MODE_OVERRIDE
[ "$MODE_HTTP" = "1" ] && {
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
}

View File

@ -23,7 +23,7 @@ zapret_custom_firewall()
# $1 - 1 - run, 0 - stop
local f
local first_packets_only="$ipt_connbytes 1:1"
local first_packets_only="$ipt_connbytes 1:3"
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
@ -52,7 +52,7 @@ zapret_custom_firewall_nft()
# stop logic is not required
local f
local first_packets_only="$nft_connbytes 1"
local first_packets_only="$nft_connbytes 1-3"
local desync="mark and $DESYNC_MARK == 0"
local dest_set="ip daddr @$DISCORD_SET_NAME"
local subnets