fix short param

This commit is contained in:
GenZmeY 2021-08-01 21:54:49 +03:00
parent 5fe959e236
commit 80b2d2de15
3 changed files with 9 additions and 8 deletions

View File

@ -10,6 +10,7 @@ The program will periodically execute the allow script, passing it a set of IPs
## HowTo:
```
Usage: <kf2_logs_output> | kf2-antiddos [option]... <shell> <deny_script> <allow_script>
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
```

View File

@ -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, "")

View File

@ -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