net

package
v0.0.0-...-cab4e99 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirewallDialer

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

FirewallDialer is a net dialer which integrates a firewall to block specific addresses.

func NewFirewallDialer

func NewFirewallDialer(cfgProvider FirewallDialerConfigProvider) *FirewallDialer

func (*FirewallDialer) DialContext

func (d *FirewallDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

type FirewallDialerConfigProvider

type FirewallDialerConfigProvider interface {
	BlockCIDRNetworks() []flagext.CIDR
	BlockPrivateAddresses() bool
}

Jump to

Keyboard shortcuts

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