group

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: GPL-2.0 Imports: 22 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSelector

func NewSelector(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.SelectorOutboundOptions) (adapter.Outbound, error)

func NewURLTest

func NewURLTest(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.URLTestOutboundOptions) (adapter.Outbound, error)

func RealTag

func RealTag(outboundManager adapter.OutboundManager, detour adapter.Outbound) string

func RegisterSelector

func RegisterSelector(registry *outbound.Registry)

func RegisterURLTest

func RegisterURLTest(registry *outbound.Registry)

func URLTestOutbounds added in v1.14.0

func URLTestOutbounds(ctx context.Context, outboundManager adapter.OutboundManager, history *urltest.HistoryStorage, logger log.Logger, outbounds []adapter.Outbound, link string, interval time.Duration, force bool) map[string]uint16

Types

type Selector

type Selector struct {
	outbound.Adapter
	// contains filtered or unexported fields
}

func (*Selector) All

func (s *Selector) All() []string

func (*Selector) DialContext

func (s *Selector) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Selector) ListenPacket

func (s *Selector) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*Selector) Network

func (s *Selector) Network() []string

func (*Selector) NewConnection added in v1.14.0

func (s *Selector) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)

func (*Selector) NewPacketConnection added in v1.14.0

func (s *Selector) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)

func (*Selector) Now

func (s *Selector) Now() string

func (*Selector) SelectOutbound

func (s *Selector) SelectOutbound(tag string) bool

func (*Selector) Start

func (s *Selector) Start() error

type URLTest

type URLTest struct {
	outbound.Adapter
	// contains filtered or unexported fields
}

func (*URLTest) All

func (s *URLTest) All() []string

func (*URLTest) CheckOutbounds

func (s *URLTest) CheckOutbounds()

func (*URLTest) Close

func (s *URLTest) Close() error

func (*URLTest) DialContext

func (s *URLTest) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*URLTest) InterfaceUpdated

func (s *URLTest) InterfaceUpdated(ctx context.Context)

func (*URLTest) ListenPacket

func (s *URLTest) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*URLTest) NewConnection added in v1.14.0

func (s *URLTest) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)

func (*URLTest) NewPacketConnection added in v1.14.0

func (s *URLTest) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)

func (*URLTest) Now

func (s *URLTest) Now() string

func (*URLTest) PerformUpdateCheck added in v1.13.20

func (s *URLTest) PerformUpdateCheck()

func (*URLTest) PostStart

func (s *URLTest) PostStart() error

func (*URLTest) Start

func (s *URLTest) Start() error

func (*URLTest) URLTest

func (s *URLTest) URLTest(ctx context.Context) (map[string]uint16, error)

type URLTestGroup

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

func NewURLTestGroup

func NewURLTestGroup(ctx context.Context, outboundManager adapter.OutboundManager, logger log.Logger, outbounds []adapter.Outbound, link string, interval time.Duration, tolerance uint16, idleTimeout time.Duration, interruptExternalConnections bool) (*URLTestGroup, error)

func (*URLTestGroup) CheckOutbounds

func (g *URLTestGroup) CheckOutbounds(ctx context.Context, force bool)

func (*URLTestGroup) Close

func (g *URLTestGroup) Close() error

func (*URLTestGroup) PostStart

func (g *URLTestGroup) PostStart()

func (*URLTestGroup) Select

func (g *URLTestGroup) Select(network string) (adapter.Outbound, bool)

func (*URLTestGroup) Touch

func (g *URLTestGroup) Touch()

func (*URLTestGroup) URLTest

func (g *URLTestGroup) URLTest(ctx context.Context) (map[string]uint16, error)

Jump to

Keyboard shortcuts

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