base

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrShutdownTimeout = errors.New("proxy shutdown timeout")
	ErrDropped         = errors.New("connection dropped")
	ErrTLSUnsupported  = errors.New("TLS is unsopported")
)

Functions

func IsConnectionClosed added in v1.1.0

func IsConnectionClosed(err error) bool

func NetAddrToNetipAddrPort added in v1.1.0

func NetAddrToNetipAddrPort(a net.Addr) netip.AddrPort

Types

type ActionNotAllowedError added in v1.1.0

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

func (ActionNotAllowedError) Error added in v1.1.0

func (e ActionNotAllowedError) Error() string

type Proxy

type Proxy struct {
	Config    common.ProxyConfig
	TLSConfig *tls.Config

	Closing bool
	WG      sync.WaitGroup
	Logger  zerolog.Logger
	// contains filtered or unexported fields
}

func NewBaseProxy

func NewBaseProxy(
	cfg common.ProxyConfig,
	rs *rules.RuleSet,
	db *database.DB,
	actions []string,
) (*Proxy, error)

func (*Proxy) GetLogger added in v1.0.1

func (p *Proxy) GetLogger() *zerolog.Logger

func (*Proxy) RunFilters

func (p *Proxy) RunFilters(e wrapper.Entity, logger zerolog.Logger) bool

Return true if entity passed all checks and false if filtered.

func (*Proxy) String

func (p *Proxy) String() string

Jump to

Keyboard shortcuts

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