Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BanInvalidPort ¶
type BanInvalidPort struct{}
BanInvalidPort blocks connections with invalid port values.
type BloomBanIP ¶
type BloomBanIP struct {
// contains filtered or unexported fields
}
BloomBanIP bans an IP address by adding it to a bloom filter. BloomBanIP is stateful, and will track banned connections using a bloom filter.
func NewBloomBanIP ¶
func NewBloomBanIP(d time.Duration) *BloomBanIP
NewBloomBanIP bans an IP address by adding to a bloom filter.
type FirewallStateful ¶
FirewallStateful used when the firewall needs to be updated dynamically.
func AutoFirewall ¶
func AutoFirewall() FirewallStateful
AutoFirewall reasonable default firewall settings.
func NewFirewall ¶
func NewFirewall(rules ...Firewall) FirewallStateful
NewFirewall compose multiple firewalls into a single firewall.
type Handshaker ¶
type Handshaker interface { Accept(l net.Listener) (net.Conn, error) Release(c net.Conn, cause error) error }
Handshaker accepts connections from a net listener and performs a handshake to ensure the connection is acceptable.
func NewHandshaker ¶
func NewHandshaker(firewall FirewallStateful) Handshaker
NewHandshaker default handshake method.
Click to show internal directories.
Click to hide internal directories.