policy

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 11 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PolicyApplications = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "anubis_policy_results",
		Help: "The results of each policy rule",
	}, []string{"rule", "action"})
)

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Name      string
	UserAgent *regexp.Regexp
	Path      *regexp.Regexp
	Action    config.Rule `json:"action"`
	Challenge *config.ChallengeRules
	Ranger    cidranger.Ranger
}

func (Bot) Hash

func (b Bot) Hash() (string, error)

type ParsedConfig

type ParsedConfig struct {
	Bots              []Bot
	DNSBL             bool
	DefaultDifficulty int
	// contains filtered or unexported fields
}

func NewParsedConfig

func NewParsedConfig(orig config.Config) *ParsedConfig

func ParseConfig

func ParseConfig(fin io.Reader, fname string, defaultDifficulty int) (*ParsedConfig, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL