firewall

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool `toml:"enable"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) SanityCheck

func (conf *Config) SanityCheck() error

SanityCheck performs basic checks on the configuration.

type Firewall

type Firewall struct {
	// contains filtered or unexported fields
}

Firewall check packets before passing them to sync module.

func NewFirewall

func NewFirewall(conf *Config, net network.Network, peerSet *peerset.PeerSet, state state.Facade,
	logger *logger.Logger) *Firewall

func (*Firewall) OpenGossipBundle

func (f *Firewall) OpenGossipBundle(data []byte, source peer.ID, from peer.ID) *bundle.Bundle

func (*Firewall) OpenStreamBundle

func (f *Firewall) OpenStreamBundle(r io.Reader, from peer.ID) *bundle.Bundle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL