sing

package
v1.18.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 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 BrutalOptions

type BrutalOptions struct {
	Enabled bool   `yaml:"enabled" json:"enabled"`
	Up      string `yaml:"up" json:"up,omitempty"`
	Down    string `yaml:"down" json:"down,omitempty"`
}

type ListenerConfig

type ListenerConfig struct {
	Tunnel     C.Tunnel
	Type       C.Type
	Additions  []inbound.Addition
	UDPTimeout time.Duration
	MuxOption  MuxOption
}

type ListenerHandler

type ListenerHandler struct {
	ListenerConfig
	// contains filtered or unexported fields
}

func NewListenerHandler

func NewListenerHandler(lc ListenerConfig) (h *ListenerHandler, err error)

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

type MuxOption

type MuxOption struct {
	Padding bool          `yaml:"padding" json:"padding,omitempty"`
	Brutal  BrutalOptions `yaml:"brutal" json:"brutal,omitempty"`
}

Jump to

Keyboard shortcuts

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