refactor: remove ratelimiting functionality,

add on-demand global / per-domain ddos protection enabling
add automatic redirect from captcha page back to the requested source
prettify the captcha page
This commit is contained in:
Eugene Prodan
2021-06-10 23:08:45 +03:00
parent d2137f445e
commit ae2564d4db
17 changed files with 235 additions and 1331 deletions

27
src/cli/ddos_cli.sh Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
_help() {
/bin/cat <<EOF
Usage: $0 <command> [options]
Show help screen and exit.
optional arguments:
-h, --help show this help message and exit
Commands:
Global management:
$0 global status Show status of global server ddos mode.
$0 global enable Enable global ddos mode.
$0 global disable Disable global ddos mode.
Domain management:
$0 domain list List all domains with ddos mode on.
$0 domain status <domain> Get ddos mode status for a domain.
$0 domain add <domain> Enable ddos mode for a domain.
$0 domain del <domain> Disable ddos mode for a domain.
EOF
}
if ! [[ ${@} ]]; then
_help
fi