handler

package
v3.0.0-alpha.3....-0a41b70 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 9 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

type Forwarder interface {
	Forward(*chain.NodeGroup)
}

type HandleOption

type HandleOption func(opts *HandleOptions)

func MetadataHandleOption

func MetadataHandleOption(md metadata.Metadata) HandleOption

type HandleOptions

type HandleOptions struct {
	Metadata metadata.Metadata
}

type Handler

type Handler interface {
	Init(metadata.Metadata) error
	Handle(context.Context, net.Conn, ...HandleOption) error
}

type Option

type Option func(opts *Options)

func AuthOption

func AuthOption(auth *url.Userinfo) Option

func AutherOption

func AutherOption(auther auth.Authenticator) Option

func BypassOption

func BypassOption(bypass bypass.Bypass) Option

func LoggerOption

func LoggerOption(logger logger.Logger) Option

func RouterOption

func RouterOption(router *chain.Router) Option

func TLSConfigOption

func TLSConfigOption(tlsConfig *tls.Config) Option

type Options

type Options struct {
	Bypass    bypass.Bypass
	Router    *chain.Router
	Auth      *url.Userinfo
	Auther    auth.Authenticator
	TLSConfig *tls.Config
	Logger    logger.Logger
}

Directories

Path Synopsis
forward
socks
v4
v5

Jump to

Keyboard shortcuts

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