Documentation ¶
Index ¶
- func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, ...) (C.ProxyAdapter, error)
- type Fallback
- func (f *Fallback) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)
- func (f *Fallback) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error)
- func (f *Fallback) MarshalJSON() ([]byte, error)
- func (f *Fallback) Now() string
- func (f *Fallback) SupportUDP() bool
- func (f *Fallback) Unwrap(metadata *C.Metadata) C.Proxy
- type GroupCommonOption
- type LoadBalance
- func (lb *LoadBalance) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (c C.Conn, err error)
- func (lb *LoadBalance) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (pc C.PacketConn, err error)
- func (lb *LoadBalance) MarshalJSON() ([]byte, error)
- func (lb *LoadBalance) SupportUDP() bool
- func (lb *LoadBalance) Unwrap(metadata *C.Metadata) C.Proxy
- type Relay
- type Selector
- func (s *Selector) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)
- func (s *Selector) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error)
- func (s *Selector) MarshalJSON() ([]byte, error)
- func (s *Selector) Now() string
- func (s *Selector) Set(name string) error
- func (s *Selector) SupportUDP() bool
- func (s *Selector) Unwrap(metadata *C.Metadata) C.Proxy
- type URLTest
- func (u *URLTest) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (c C.Conn, err error)
- func (u *URLTest) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error)
- func (u *URLTest) MarshalJSON() ([]byte, error)
- func (u *URLTest) Now() string
- func (u *URLTest) SupportUDP() bool
- func (u *URLTest) Unwrap(metadata *C.Metadata) C.Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseProxyGroup ¶
Types ¶
type Fallback ¶
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 ¶
MarshalJSON implements C.ProxyAdapter
func (*Fallback) SupportUDP ¶
SupportUDP 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"` }
type LoadBalance ¶
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
type Relay ¶
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 ¶
MarshalJSON implements C.ProxyAdapter
type Selector ¶
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 ¶
MarshalJSON implements C.ProxyAdapter
func (*Selector) SupportUDP ¶
SupportUDP implements C.ProxyAdapter
type URLTest ¶
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 ¶
MarshalJSON implements C.ProxyAdapter
func (*URLTest) SupportUDP ¶
SupportUDP implements C.ProxyAdapter