docs: add iplist2rule docs

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-12-29 10:58:11 -05:00
parent ad41bc7a25
commit c84a414570
3 changed files with 63 additions and 6 deletions

View File

@@ -25,15 +25,19 @@ func init() {
flag.Usage = func() {
fmt.Printf(`Usage of %[1]s:
%[1]s [--action=DENY|ALLOW] [--rule-name=] <blocklist-url> <filename>
%[1]s [flags] <blocklist-url> <filename>
Grabs the contents of the blocklist, converts it to an Anubis ruleset, and writes it to filename.
Flags:
`, filepath.Base(os.Args[0]))
flag.PrintDefaults()
}
}
var (
action = flag.String("action", "DENY", "Anubis action to take (ALLOW / DENY)")
action = flag.String("action", "DENY", "Anubis action to take (ALLOW / DENY / WEIGH)")
manualRuleName = flag.String("rule-name", "", "If set, prefer this name over inferring from filename")
weight = flag.Int("weight", 0, "If set to any number, add/subtract this many weight points when --action=WEIGH")
)