Documentation
¶
Overview ¶
Package fail2ban contains the Fail2ban mechanism for the plugin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Blacklist List `yaml:"blacklist"`
Whitelist List `yaml:"whitelist"`
Rules Rules `yaml:"port"`
}
Config struct.
type Fail2Ban ¶
type Fail2Ban struct {
// contains filtered or unexported fields
}
Fail2Ban holds the necessary components of a Traefik plugin.
type Rules ¶
type Rules struct {
Bantime string `yaml:"bantime"` // exprimate in a smart way: 3m
Enabled bool `yaml:"enabled"` // enable or disable the jail
Findtime string `yaml:"findtime"` // exprimate in a smart way: 3m
Maxretry int `yaml:"maxretry"`
Urlregexps []Urlregexp `yaml:"urlregexps"`
Xrealip bool `yaml:"xrealip"`
}
Rules struct fail2ban config.
type RulesTransformed ¶
type RulesTransformed struct {
Bantime time.Duration
Findtime time.Duration
URLRegexpAllow []*regexp.Regexp
URLRegexpBan []*regexp.Regexp
MaxRetry int
Enabled bool
Xrealip bool
}
RulesTransformed transformed Rules struct.
func TransformRule ¶
func TransformRule(r Rules) (RulesTransformed, error)
TransformRule morph a Rules object into a RulesTransformed.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package files contains the files management for the plugin.
|
Package files contains the files management for the plugin. |
|
Package ipchecking wrapper over net/netip to compare both IP and CIRD.
|
Package ipchecking wrapper over net/netip to compare both IP and CIRD. |
|
Package log contains the logger mechanism for the plugin.
|
Package log contains the logger mechanism for the plugin. |
Click to show internal directories.
Click to hide internal directories.



