access

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJSDenied = errors.New("denied by JS filter")

Functions

This section is empty.

Types

type AlwaysAllow

type AlwaysAllow struct{}

func (AlwaysAllow) Access

func (_ AlwaysAllow) Access(_ context.Context, _ *http.Request, _, _, _ string) error

type DstAddrFilter

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

func NewDstAddrFilter

func NewDstAddrFilter(prefixes []netip.Prefix, next Filter) DstAddrFilter

func (DstAddrFilter) Access

func (f DstAddrFilter) Access(ctx context.Context, req *http.Request, username, network, address string) error

type ErrDestinationAddressNotAllowed

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

func (ErrDestinationAddressNotAllowed) Error

type Filter

type Filter interface {
	Access(ctx context.Context, req *http.Request, username, network, address string) error
}

type JSFilter added in v1.17.0

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

JSFilter is not suitable for concurrent use! Wrap it with filter pool for that!

func NewJSFilter added in v1.17.0

func NewJSFilter(filename string, instances int, logger *clog.CondLogger, next Filter) (*JSFilter, error)

func (*JSFilter) Access added in v1.17.0

func (j *JSFilter) Access(ctx context.Context, req *http.Request, username, network, address string) error

type JSFilterFunc added in v1.17.0

type JSFilterFunc = func(req *jsext.JSRequestInfo, dst *jsext.JSDstInfo, username string) (bool, error)

Jump to

Keyboard shortcuts

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