mirror of https://github.com/bol-van/zapret/
5 changed files with 143 additions and 40 deletions
@ -0,0 +1,21 @@ |
|||||
|
# this script contain your special code to launch daemons and configure firewall |
||||
|
# use helpers from "functions" file |
||||
|
# in case of upgrade keep this file only, do not modify others |
||||
|
|
||||
|
zapret_custom_daemons() |
||||
|
{ |
||||
|
# $1 - 1 - run, 0 - stop |
||||
|
: |
||||
|
} |
||||
|
|
||||
|
# custom firewall functions echo rules for zapret-v4 and zapret-v6 anchors |
||||
|
# they come after automated table definitions. so you can use <zapret> <zapret6> <zapret-user> ... |
||||
|
|
||||
|
zapret_custom_firewall_v4() |
||||
|
{ |
||||
|
: |
||||
|
} |
||||
|
zapret_custom_firewall_v6() |
||||
|
{ |
||||
|
: |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
# this script is an example describing how to run tpws on a custom port |
||||
|
|
||||
|
TPPORT_MY=987 |
||||
|
|
||||
|
zapret_custom_daemons() |
||||
|
{ |
||||
|
# $1 - 1 - run, 0 - stop |
||||
|
local opt="--user=root --port=$TPPORT_MY" |
||||
|
filter_apply_hostlist_target opt |
||||
|
tpws_apply_binds opt |
||||
|
opt="$opt $TPWS_OPT" |
||||
|
do_daemon $1 1 "$TPWS" "$opt" |
||||
|
} |
||||
|
|
||||
|
# custom firewall functions echo rules for zapret-v4 and zapret-v6 anchors |
||||
|
# they come after automated table definitions. so you can use <zapret> <zapret6> <zapret-user> ... |
||||
|
|
||||
|
zapret_custom_firewall_v4() |
||||
|
{ |
||||
|
pf_anchor_zapret_v4_tpws $TPPORT_MY |
||||
|
} |
||||
|
zapret_custom_firewall_v6() |
||||
|
{ |
||||
|
pf_anchor_zapret_v6_tpws $TPPORT_MY |
||||
|
} |
Loading…
Reference in new issue