outboundgroup

package
v0.0.0-...-dcc5d69 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseProxyGroup

func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, providersMap map[string]types.ProxyProvider) (C.ProxyAdapter, error)

Types

type Fallback

type Fallback struct {
	*outbound.Base
	// contains filtered or unexported fields
}

func NewFallback

func NewFallback(option *GroupCommonOption, providers []provider.ProxyProvider) *Fallback

func (*Fallback) DialContext

func (f *Fallback) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)

DialContext implements C.ProxyAdapter

func (*Fallback) ListenPacketContext

func (f *Fallback) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error)

ListenPacketContext implements C.ProxyAdapter

func (*Fallback) MarshalJSON

func (f *Fallback) MarshalJSON() ([]byte, error)

MarshalJSON implements C.ProxyAdapter

func (*Fallback) Now

func (f *Fallback) Now() string

func (*Fallback) SupportUDP

func (f *Fallback) SupportUDP() bool

SupportUDP implements C.ProxyAdapter

func (*Fallback) Unwrap

func (f *Fallback) Unwrap(metadata *C.Metadata) C.Proxy

Unwrap implements C.ProxyAdapter

type GroupCommonOption

type GroupCommonOption struct {
	outbound.BasicOption
	Name       string   `group:"name"`
	Type       string   `group:"type"`
	Proxies    []string `group:"proxies,omitempty"`
	Use        []string `group:"use,omitempty"`
	URL        string   `group:"url,omitempty"`
	Interval   int      `group:"interval,omitempty"`
	Lazy       bool     `group:"lazy,omitempty"`
	DisableUDP bool     `group:"disable-udp,omitempty"`
	Filter     string   `group:"filter,omitempty"`
}

type LoadBalance

type LoadBalance struct {
	*outbound.Base
	// contains filtered or unexported fields
}

func NewLoadBalance

func NewLoadBalance(option *GroupCommonOption, providers []provider.ProxyProvider, strategy string) (lb *LoadBalance, err error)

func (*LoadBalance) DialContext

func (lb *LoadBalance) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (c C.Conn, err error)

DialContext implements C.ProxyAdapter

func (*LoadBalance) ListenPacketContext

func (lb *LoadBalance) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (pc C.PacketConn, err error)

ListenPacketContext implements C.ProxyAdapter

func (*LoadBalance) MarshalJSON

func (lb *LoadBalance) MarshalJSON() ([]byte, error)

MarshalJSON implements C.ProxyAdapter

func (*LoadBalance) SupportUDP

func (lb *LoadBalance) SupportUDP() bool

SupportUDP implements C.ProxyAdapter

func (*LoadBalance) Unwrap

func (lb *LoadBalance) Unwrap(metadata *C.Metadata) C.Proxy

Unwrap implements C.ProxyAdapter

type Relay

type Relay struct {
	*outbound.Base
	// contains filtered or unexported fields
}

func NewRelay

func NewRelay(option *GroupCommonOption, providers []provider.ProxyProvider) *Relay

func (*Relay) DialContext

func (r *Relay) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)

DialContext implements C.ProxyAdapter

func (*Relay) MarshalJSON

func (r *Relay) MarshalJSON() ([]byte, error)

MarshalJSON implements C.ProxyAdapter

type Selector

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

func NewSelector

func NewSelector(option *GroupCommonOption, providers []provider.ProxyProvider) *Selector

func (*Selector) DialContext

func (s *Selector) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)

DialContext implements C.ProxyAdapter

func (*Selector) ListenPacketContext

func (s *Selector) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error)

ListenPacketContext implements C.ProxyAdapter

func (*Selector) MarshalJSON

func (s *Selector) MarshalJSON() ([]byte, error)

MarshalJSON implements C.ProxyAdapter

func (*Selector) Now

func (s *Selector) Now() string

func (*Selector) Set

func (s *Selector) Set(name string) error

func (*Selector) SupportUDP

func (s *Selector) SupportUDP() bool

SupportUDP implements C.ProxyAdapter

func (*Selector) Unwrap

func (s *Selector) Unwrap(metadata *C.Metadata) C.Proxy

Unwrap implements C.ProxyAdapter

type URLTest

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

func NewURLTest

func NewURLTest(option *GroupCommonOption, providers []provider.ProxyProvider, options ...urlTestOption) *URLTest

func (*URLTest) DialContext

func (u *URLTest) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (c C.Conn, err error)

DialContext implements C.ProxyAdapter

func (*URLTest) ListenPacketContext

func (u *URLTest) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error)

ListenPacketContext implements C.ProxyAdapter

func (*URLTest) MarshalJSON

func (u *URLTest) MarshalJSON() ([]byte, error)

MarshalJSON implements C.ProxyAdapter

func (*URLTest) Now

func (u *URLTest) Now() string

func (*URLTest) SupportUDP

func (u *URLTest) SupportUDP() bool

SupportUDP implements C.ProxyAdapter

func (*URLTest) Unwrap

func (u *URLTest) Unwrap(metadata *C.Metadata) C.Proxy

Unwrap implements C.ProxyAdapter

Jump to

Keyboard shortcuts

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