Documentation
¶
Index ¶
- type Config
- type Firewall
- func (f *Firewall) AllowBlockRequest() bool
- func (f *Firewall) AllowConsensusRequest() bool
- func (f *Firewall) AllowTransactionRequest() bool
- func (f *Firewall) IsBlackListAddress(remoteAddr string) bool
- func (f *Firewall) OpenGossipBundle(data []byte, from peer.ID) *bundle.Bundle
- func (f *Firewall) OpenStreamBundle(r io.Reader, from peer.ID) *bundle.Bundle
- type RateLimit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BlackListAddresses []string `toml:"blacklist_addresses"`
RateLimit RateLimit `toml:"rate_limit"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) BasicCheck ¶ added in v0.15.0
BasicCheck performs basic checks on the configuration.
func (*Config) GetBlackListAddresses ¶ added in v1.1.8
BlackListAddresses returns the list of blacklisted addresses. It is a combination of user-defined addresses and pre-defined addresses in the `black_list.json` file.
type Firewall ¶
type Firewall struct {
// contains filtered or unexported fields
}
Firewall check packets before passing them to sync module.
func NewFirewall ¶
func (*Firewall) AllowBlockRequest ¶ added in v1.1.8
func (*Firewall) AllowConsensusRequest ¶ added in v1.1.8
func (*Firewall) AllowTransactionRequest ¶ added in v1.1.8
func (*Firewall) IsBlackListAddress ¶ added in v1.1.7
func (*Firewall) OpenGossipBundle ¶
Click to show internal directories.
Click to hide internal directories.