sing

package
v0.0.0-...-d0ac596 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const UDPTimeout = 5 * time.Minute

Variables

This section is empty.

Functions

func ConvertMetadata

func ConvertMetadata(metadata *C.Metadata) M.Metadata

func ShouldIgnorePacketError

func ShouldIgnorePacketError(err error) bool

func UpstreamMetadata

func UpstreamMetadata(metadata M.Metadata) M.Metadata

func WithAdditions

func WithAdditions(ctx context.Context, additions ...inbound.Addition) context.Context

Types

type ListenerHandler

type ListenerHandler struct {
	TcpIn      chan<- C.ConnContext
	UdpIn      chan<- C.PacketAdapter
	Type       C.Type
	Additions  []inbound.Addition
	UDPTimeout time.Duration
}

func (*ListenerHandler) IsSpecialFqdn

func (h *ListenerHandler) IsSpecialFqdn(fqdn string) bool

func (*ListenerHandler) NewConnection

func (h *ListenerHandler) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error

func (*ListenerHandler) NewError

func (h *ListenerHandler) NewError(ctx context.Context, err error)

func (*ListenerHandler) NewPacketConnection

func (h *ListenerHandler) NewPacketConnection(ctx context.Context, conn network.PacketConn, metadata M.Metadata) error

func (*ListenerHandler) ParseSpecialFqdn

func (h *ListenerHandler) ParseSpecialFqdn(ctx context.Context, conn net.Conn, metadata M.Metadata) error

Jump to

Keyboard shortcuts

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