layers

package
v0.0.0-...-fa2cb06 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdblockLayer

func NewAdblockLayer(lists []string) layers.Layer

func NewAuthLayer

func NewAuthLayer(user string) layers.Layer

func NewBaseLayer

func NewBaseLayer(metrics *stats.Stats) layers.Layer

func NewDirectAccessLayer

func NewDirectAccessLayer(regexps []string, exceptRegxeps []string) layers.Layer

func NewRateLimiterLayer

func NewRateLimiterLayer(concurrentConnections int) layers.Layer

func NewRefererLayer

func NewRefererLayer() layers.Layer

func NewSessionsLayer

func NewSessionsLayer(conf *config.Config, executor executor.Executor) layers.Layer

func NewXHeadersLayer

func NewXHeadersLayer(xheaders map[string]string) layers.Layer

Types

type AdblockLayer

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

func (*AdblockLayer) OnRequest

func (a *AdblockLayer) OnRequest(ctx *layers.Context) error

func (*AdblockLayer) OnResponse

func (a *AdblockLayer) OnResponse(ctx *layers.Context, err error) error

type AuthLayer

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

func (*AuthLayer) OnRequest

func (h *AuthLayer) OnRequest(ctx *layers.Context) error

func (*AuthLayer) OnResponse

func (h *AuthLayer) OnResponse(_ *layers.Context, err error) error

type BaseLayer

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

func (*BaseLayer) OnRequest

func (b *BaseLayer) OnRequest(ctx *layers.Context) error

func (*BaseLayer) OnResponse

func (b *BaseLayer) OnResponse(ctx *layers.Context, err error) error

type DirectAccessLayer

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

func (*DirectAccessLayer) OnRequest

func (d *DirectAccessLayer) OnRequest(ctx *layers.Context) error

func (*DirectAccessLayer) OnResponse

func (d *DirectAccessLayer) OnResponse(ctx *layers.Context, err error) error

type RateLimiterLayer

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

func (*RateLimiterLayer) OnRequest

func (r *RateLimiterLayer) OnRequest(_ *layers.Context) error

func (*RateLimiterLayer) OnResponse

func (r *RateLimiterLayer) OnResponse(_ *layers.Context, err error) error

type RefererLayer

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

func (*RefererLayer) OnRequest

func (r *RefererLayer) OnRequest(ctx *layers.Context) error

func (*RefererLayer) OnResponse

func (r *RefererLayer) OnResponse(_ *layers.Context, err error) error

type SessionsLayer

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

func (*SessionsLayer) OnRequest

func (s *SessionsLayer) OnRequest(ctx *layers.Context) error

func (*SessionsLayer) OnResponse

func (s *SessionsLayer) OnResponse(ctx *layers.Context, err error) error

type XHeadersLayer

type XHeadersLayer struct {
	XHeaders map[string]string
}

func (*XHeadersLayer) OnRequest

func (h *XHeadersLayer) OnRequest(ctx *layers.Context) error

func (*XHeadersLayer) OnResponse

func (h *XHeadersLayer) OnResponse(_ *layers.Context, err error) error

Jump to

Keyboard shortcuts

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