Skip to content

Commit

Permalink
fix short param
Browse files Browse the repository at this point in the history
  • Loading branch information
GenZmeY committed Aug 1, 2021
1 parent 5fe959e commit 80b2d2d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
```
Expand Down
8 changes: 4 additions & 4 deletions cmd/kf2-antiddos/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -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, "")
Expand Down
4 changes: 2 additions & 2 deletions doc/README
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 80b2d2d

Please sign in to comment.