outbound

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: AGPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(config *HandlerConfig) (i.Outbound, error)

func NewOutHandler

func NewOutHandler(config *Config) (i.Outbound, error)

TODO: Validate config

Types

type ChainHandler

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

func NewChainHandler

func NewChainHandler(config *ChainHandlerConfig) (*ChainHandler, error)

func (*ChainHandler) HandleFlow

func (c *ChainHandler) HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error

func (*ChainHandler) HandlePacketConn

func (c *ChainHandler) HandlePacketConn(ctx context.Context, dst net.Destination, p udp.PacketReaderWriter) error

func (*ChainHandler) Tag

func (c *ChainHandler) Tag() string

type ChainHandlerConfig

type ChainHandlerConfig struct {
	*configs.ChainHandlerConfig
	Policy                      *policy.Policy
	IPResolver                  i.IPResolver
	DF                          transport.DialerFactory
	IPResolverForRequestAddress i.IPResolver
	// used to lookup ech config
	EchResolver i.ECHResolver
	RejectQuic  bool
}

type Config

type Config struct {
	*configs.OutboundHandlerConfig
	DialerFactory transport.DialerFactory
	Policy        i.TimeoutSetting
	// some outbound require it to lookup server addresses
	IPResolver  i.IPResolver
	ECHResolver i.ECHResolver
	// some outbounds need it to lookup ips of request addresses
	IPResolverForRequestAddress i.IPResolver
	RejectQuic                  bool
}

type HandlerConfig

type HandlerConfig struct {
	*configs.HandlerConfig
	DialerFactory transport.DialerFactory
	Policy        *policy.Policy
	// for node domain
	IPResolver                  i.IPResolver
	EchResolver                 i.ECHResolver
	IPResolverForRequestAddress i.IPResolver
	RejectQuic                  bool
}

type HandlerCreator

type HandlerCreator func(config interface{}, address string, portSelector i.PortSelector,
) (i.Outbound, error)

Jump to

Keyboard shortcuts

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