Versions in this module Expand all Collapse all v1 v1.1.2 Sep 16, 2021 Changes in this version + const Halflife + const LevelConnException + const LevelMsgIllegal + const Lifetime + var ErrConnectBannedPeer = errors.New("connect banned peer") + type Blacklist struct + func NewBlacklist(config *cfg.Config) *Blacklist + func (bl *Blacklist) AddPeer(ip string) error + func (bl *Blacklist) DoFilter(ip string, pubKey string) error + func (bl *Blacklist) LoadPeers() error + type DynamicBanScore struct + func (s *DynamicBanScore) Increase(persistent, transient uint32) uint32 + func (s *DynamicBanScore) Int() uint32 + func (s *DynamicBanScore) Reset() + func (s *DynamicBanScore) String() string + type Filter interface + DoFilter func(string, string) error + type PeerFilter struct + func NewPeerFilter() *PeerFilter + type PeersBanScore struct + func NewPeersScore() *PeersBanScore + func (ps *PeersBanScore) DelPeer(ip string) + func (ps *PeersBanScore) Increase(ip string, level byte, reason string) bool + type Security struct + func NewSecurity(config *cfg.Config) *Security + func (s *Security) DoFilter(ip string, pubKey string) error + func (s *Security) IsBanned(ip string, level byte, reason string) bool + func (s *Security) RegisterFilter(filter Filter) + func (s *Security) Start() error