Discover Packages
git.gammaspectra.live/WeebDataHoarder/anubis
internal
config
package
Version:
v0.0.0-...-eb578a8
Opens a new window with list of versions in this module.
Published: Mar 16, 2025
License: CC0-1.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
const (
RuleUnknown = ""
RuleAllow = "ALLOW"
RuleDeny = "DENY"
RuleChallenge = "CHALLENGE"
)
View Source
var (
ErrBotMustHaveName = errors .New ("config.Bot: must set name")
ErrBotMustHaveUserAgentPathOrBoth = errors .New ("config.Bot: must set either user_agent_regex, path_regex, query_regex, or networks")
ErrUnknownAction = errors .New ("config.Bot: unknown action")
)
type Bot struct {
Name string `json:"name"`
UserAgentRegex *string `json:"user_agent_regex"`
PathRegex *string `json:"path_regex"`
QueryRegex *string `json:"query_regex"`
Networks []string `json:"networks"`
Action Rule `json:"action"`
}
type Config struct {
Bots []Bot `json:"bots"`
DNSBL bool `json:"dnsbl"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.