Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocker ¶
type Blocker struct { BlockTime time.Duration MaxAttempts int Identifier string // contains filtered or unexported fields }
Blocker 用于管理IP封禁
func NewBlocker ¶
NewBlocker 创建一个新的Blocker
func (*Blocker) CleanupOldRules ¶
func (b *Blocker) CleanupOldRules()
CleanupOldRules 清理旧的iptables规则
func (*Blocker) RegisterFailedAttempt ¶
RegisterFailedAttempt 注册一次失败的尝试
Click to show internal directories.
Click to hide internal directories.