inits : combine identicals cases

This commit is contained in:
bolvan 2019-05-23 19:36:49 +03:00
parent d8dae093dd
commit 52f3bf88bb

View File

@ -201,7 +201,7 @@ create_ipset()
zapret_apply_firewall() zapret_apply_firewall()
{ {
case "${MODE}" in case "${MODE}" in
tpws_hostlist) tpws_hostlist|tpws_all)
fw_tpws "--dport 80" "--dport 80" $TPPORT_HTTP fw_tpws "--dport 80" "--dport 80" $TPPORT_HTTP
;; ;;
tpws_ipset) tpws_ipset)
@ -213,9 +213,6 @@ zapret_apply_firewall()
fw_tpws "--dport 80 -m set --match-set zapret dst" "--dport 80 -m set --match-set zapret6 dst" $TPPORT_HTTP fw_tpws "--dport 80 -m set --match-set zapret dst" "--dport 80 -m set --match-set zapret6 dst" $TPPORT_HTTP
fw_tpws "--dport 443 -m set --match-set zapret dst" "--dport 443 -m set --match-set zapret6 dst" $TPPORT_HTTPS fw_tpws "--dport 443 -m set --match-set zapret dst" "--dport 443 -m set --match-set zapret6 dst" $TPPORT_HTTPS
;; ;;
tpws_all)
fw_tpws "--dport 80" "--dport 80" $TPPORT_HTTP
;;
tpws_all_https) tpws_all_https)
fw_tpws "--dport 80" "--dport 80" $TPPORT_HTTP fw_tpws "--dport 80" "--dport 80" $TPPORT_HTTP
fw_tpws "--dport 443" "--dport 443" $TPPORT_HTTPS fw_tpws "--dport 443" "--dport 443" $TPPORT_HTTPS