Versions in this module Expand all Collapse all v0 v0.1.0 Oct 20, 2026 Changes in this version + const UnknownCountry + const VarASN + const VarContinent + const VarCountry + const VarDecision + const VarRule + func ParseASN(s string) (uint32, error) + func ParseContinent(s string) (string, error) + func ParseCountry(s string) (string, error) + func ParsePrefix(s string) (netip.Prefix, error) + type Action uint8 + const ActionAllow + const ActionDeny + func ParseAction(s string) (Action, error) + func (a Action) String() string + type App struct + AutoUpdate bool + DBASN string + DBCountry string + Groups map[string]Selector + PerHostMetrics bool + ReloadInterval caddy.Duration + func (*App) CaddyModule() caddy.ModuleInfo + func (a *App) Provision(ctx caddy.Context) error + func (a *App) Start() error + func (a *App) Stop() error + type Decision struct + Action Action + Rule int + type Handler struct + StatusCode int + func (*Handler) CaddyModule() caddy.ModuleInfo + func (h *Handler) Provision(ctx caddy.Context) error + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error + func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type Matcher struct + Decision string + func (*Matcher) CaddyModule() caddy.ModuleInfo + func (m *Matcher) Match(r *http.Request) bool + func (m *Matcher) MatchWithError(r *http.Request) (bool, error) + func (m *Matcher) Provision(ctx caddy.Context) error + func (m *Matcher) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + type Policy struct + Default string + OnLookupError string + Rules []Rule + type Rule struct + Action string + type Selector struct + ASNs []uint32 + Continents []string + Countries []string + Groups []string + IPFiles []string + IPs []string + PrivateRanges bool