fix short param
This commit is contained in:
parent
5fe959e236
commit
80b2d2de15
@ -10,6 +10,7 @@ The program will periodically execute the allow script, passing it a set of IPs
|
|||||||
## HowTo:
|
## HowTo:
|
||||||
```
|
```
|
||||||
Usage: <kf2_logs_output> | kf2-antiddos [option]... <shell> <deny_script> <allow_script>
|
Usage: <kf2_logs_output> | kf2-antiddos [option]... <shell> <deny_script> <allow_script>
|
||||||
|
|
||||||
kf2_logs_output KF2 logs to redirect to stdin
|
kf2_logs_output KF2 logs to redirect to stdin
|
||||||
shell shell to run deny_script and allow_script
|
shell shell to run deny_script and allow_script
|
||||||
deny_script firewall deny script (takes IP as argument)
|
deny_script firewall deny script (takes IP as argument)
|
||||||
@ -18,8 +19,8 @@ allow_script firewall allow script (takes IPs as arguments)
|
|||||||
Options:
|
Options:
|
||||||
-j, --jobs N allow N jobs at once
|
-j, --jobs N allow N jobs at once
|
||||||
-o, --output MODE self|proxy|all|quiet
|
-o, --output MODE self|proxy|all|quiet
|
||||||
-dt, --deny-time TIME minimum ip deny TIME (seconds)
|
-t, --deny-time TIME minimum ip deny TIME (seconds)
|
||||||
-mc, --max-connections N Skip N connections before run deny script
|
-c, --max-connections N Skip N connections before run deny script
|
||||||
-v, --version Show version
|
-v, --version Show version
|
||||||
-h, --help Show help
|
-h, --help Show help
|
||||||
```
|
```
|
||||||
|
@ -19,8 +19,8 @@ func printHelp() {
|
|||||||
output.Println("Options:")
|
output.Println("Options:")
|
||||||
output.Println(" -j, --jobs N allow N jobs at once")
|
output.Println(" -j, --jobs N allow N jobs at once")
|
||||||
output.Println(" -o, --output MODE self|proxy|all|quiet")
|
output.Println(" -o, --output MODE self|proxy|all|quiet")
|
||||||
output.Println(" -dt, --deny-time TIME minimum ip deny TIME (seconds)")
|
output.Println(" -t, --deny-time TIME minimum ip deny TIME (seconds)")
|
||||||
output.Println(" -mc, --max-connections N Skip N connections before run deny script")
|
output.Println(" -c, --max-connections N Skip N connections before run deny script")
|
||||||
output.Println(" -v, --version Show version")
|
output.Println(" -v, --version Show version")
|
||||||
output.Println(" -h, --help Show help")
|
output.Println(" -h, --help Show help")
|
||||||
}
|
}
|
||||||
@ -38,10 +38,10 @@ func parseArgs() config.Config {
|
|||||||
gnuflag.StringVar(&rawCfg.OutputMode, "o", "", "")
|
gnuflag.StringVar(&rawCfg.OutputMode, "o", "", "")
|
||||||
gnuflag.StringVar(&rawCfg.OutputMode, "output", "", "")
|
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.DenyTime, "deny-time", 0, "")
|
||||||
|
|
||||||
gnuflag.UintVar(&rawCfg.MaxConn, "mc", 0, "")
|
gnuflag.UintVar(&rawCfg.MaxConn, "c", 0, "")
|
||||||
gnuflag.UintVar(&rawCfg.MaxConn, "max-connections", 0, "")
|
gnuflag.UintVar(&rawCfg.MaxConn, "max-connections", 0, "")
|
||||||
|
|
||||||
gnuflag.BoolVar(&rawCfg.ShowVersion, "v", false, "")
|
gnuflag.BoolVar(&rawCfg.ShowVersion, "v", false, "")
|
||||||
|
@ -9,7 +9,7 @@ allow_script firewall allow script (takes IPs as arguments)
|
|||||||
Options:
|
Options:
|
||||||
-j, --jobs N allow N jobs at once
|
-j, --jobs N allow N jobs at once
|
||||||
-o, --output MODE self|proxy|all|quiet
|
-o, --output MODE self|proxy|all|quiet
|
||||||
-dt, --deny-time TIME minimum ip deny TIME (seconds)
|
-t, --deny-time TIME minimum ip deny TIME (seconds)
|
||||||
-mc, --max-connections N Skip N connections before run deny script
|
-c, --max-connections N Skip N connections before run deny script
|
||||||
-v, --version Show version
|
-v, --version Show version
|
||||||
-h, --help Show help
|
-h, --help Show help
|
||||||
|
Loading…
x
Reference in New Issue
Block a user