From 80b2d2de15211b1e1774fe1e802a58c89c106c9e Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sun, 1 Aug 2021 21:54:49 +0300 Subject: [PATCH] fix short param --- README.md | 5 +++-- cmd/kf2-antiddos/args.go | 8 ++++---- doc/README | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3635efd..cb85680 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ The program will periodically execute the allow script, passing it a set of IPs ## HowTo: ``` Usage: | kf2-antiddos [option]... + kf2_logs_output KF2 logs to redirect to stdin shell shell to run deny_script and allow_script deny_script firewall deny script (takes IP as argument) @@ -18,8 +19,8 @@ allow_script firewall allow script (takes IPs as arguments) Options: -j, --jobs N allow N jobs at once -o, --output MODE self|proxy|all|quiet - -dt, --deny-time TIME minimum ip deny TIME (seconds) - -mc, --max-connections N Skip N connections before run deny script + -t, --deny-time TIME minimum ip deny TIME (seconds) + -c, --max-connections N Skip N connections before run deny script -v, --version Show version -h, --help Show help ``` diff --git a/cmd/kf2-antiddos/args.go b/cmd/kf2-antiddos/args.go index 7a6f021..91d2a03 100644 --- a/cmd/kf2-antiddos/args.go +++ b/cmd/kf2-antiddos/args.go @@ -19,8 +19,8 @@ func printHelp() { output.Println("Options:") output.Println(" -j, --jobs N allow N jobs at once") output.Println(" -o, --output MODE self|proxy|all|quiet") - output.Println(" -dt, --deny-time TIME minimum ip deny TIME (seconds)") - output.Println(" -mc, --max-connections N Skip N connections before run deny script") + output.Println(" -t, --deny-time TIME minimum ip deny TIME (seconds)") + output.Println(" -c, --max-connections N Skip N connections before run deny script") output.Println(" -v, --version Show version") output.Println(" -h, --help Show help") } @@ -38,10 +38,10 @@ func parseArgs() config.Config { gnuflag.StringVar(&rawCfg.OutputMode, "o", "", "") gnuflag.StringVar(&rawCfg.OutputMode, "output", "", "") - gnuflag.UintVar(&rawCfg.DenyTime, "dt", 0, "") + gnuflag.UintVar(&rawCfg.DenyTime, "t", 0, "") gnuflag.UintVar(&rawCfg.DenyTime, "deny-time", 0, "") - gnuflag.UintVar(&rawCfg.MaxConn, "mc", 0, "") + gnuflag.UintVar(&rawCfg.MaxConn, "c", 0, "") gnuflag.UintVar(&rawCfg.MaxConn, "max-connections", 0, "") gnuflag.BoolVar(&rawCfg.ShowVersion, "v", false, "") diff --git a/doc/README b/doc/README index 0dca3bf..0862b5a 100644 --- a/doc/README +++ b/doc/README @@ -9,7 +9,7 @@ allow_script firewall allow script (takes IPs as arguments) Options: -j, --jobs N allow N jobs at once -o, --output MODE self|proxy|all|quiet - -dt, --deny-time TIME minimum ip deny TIME (seconds) - -mc, --max-connections N Skip N connections before run deny script + -t, --deny-time TIME minimum ip deny TIME (seconds) + -c, --max-connections N Skip N connections before run deny script -v, --version Show version -h, --help Show help