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) ForceSet(name string)
- func (f *Fallback) Hint()
- func (f *Fallback) IsL3Protocol(metadata *C.Metadata) bool
- 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) Set(name string) error
- func (f *Fallback) SupportUDP() bool
- func (f *Fallback) Unwrap(metadata *C.Metadata, touch bool) C.Proxy
- type GroupBase
- func (gb *GroupBase) GetHints() chan struct{}
- func (gb *GroupBase) GetProxies(touch bool) []C.Proxy
- func (gb *GroupBase) GetProxiesCH() []C.Proxy
- func (gb *GroupBase) Touch()
- func (gb *GroupBase) URLTest(ctx context.Context, url string, expectedStatus utils.IntRanges[uint16]) (map[string]uint16, error)
- type GroupBaseOption
- 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) Hint()
- func (lb *LoadBalance) IsL3Protocol(metadata *C.Metadata) bool
- 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, touch bool) C.Proxy
- type Relay
- func (r *Relay) Addr() string
- func (r *Relay) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)
- func (r *Relay) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (_ C.PacketConn, err error)
- func (r *Relay) MarshalJSON() ([]byte, error)
- func (r *Relay) SupportUDP() bool
- type SelectAble
- type Selector
- func (s *Selector) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error)
- func (s *Selector) ForceSet(name string)
- func (s *Selector) Hint()
- func (s *Selector) IsL3Protocol(metadata *C.Metadata) bool
- 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, touch bool) 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) ForceSet(name string)
- func (u *URLTest) Hint()
- func (u *URLTest) IsL3Protocol(metadata *C.Metadata) bool
- 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) Set(name string) error
- func (u *URLTest) SupportUDP() bool
- func (u *URLTest) URLTest(ctx context.Context, url string, expectedStatus utils.IntRanges[uint16]) (map[string]uint16, error)
- func (u *URLTest) Unwrap(metadata *C.Metadata, touch bool) C.Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseProxyGroup ¶
Types ¶
type Fallback ¶
type Fallback struct { *GroupBase Hidden bool Icon string // 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) IsL3Protocol ¶
IsL3Protocol 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 GroupBase ¶
type GroupBase struct { *outbound.Base ChProxies chan []C.Proxy TestTimeout int // contains filtered or unexported fields }
func NewGroupBase ¶
func NewGroupBase(opt GroupBaseOption) *GroupBase
func (*GroupBase) GetProxiesCH ¶
type GroupBaseOption ¶
type GroupBaseOption struct { outbound.BaseOption TestTimeout int // contains filtered or unexported fields }
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"` TestTimeout int `group:"timeout,omitempty"` MaxFailedTimes int `group:"max-failed-times,omitempty"` Lazy bool `group:"lazy,omitempty"` DisableUDP bool `group:"disable-udp,omitempty"` Filter string `group:"filter,omitempty"` ExcludeFilter string `group:"exclude-filter,omitempty"` ExcludeType string `group:"exclude-type,omitempty"` ExpectedStatus string `group:"expected-status,omitempty"` IncludeAll bool `group:"include-all,omitempty"` IncludeAllProxies bool `group:"include-all-proxies,omitempty"` IncludeAllProviders bool `group:"include-all-providers,omitempty"` Hidden bool `group:"hidden,omitempty"` Icon string `group:"icon,omitempty"` }
type LoadBalance ¶
type LoadBalance struct { *GroupBase Hidden bool Icon string // 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) Hint ¶
func (lb *LoadBalance) Hint()
func (*LoadBalance) IsL3Protocol ¶
func (lb *LoadBalance) IsL3Protocol(metadata *C.Metadata) bool
IsL3Protocol 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) ListenPacketContext ¶
func (r *Relay) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (_ C.PacketConn, err error)
ListenPacketContext implements C.ProxyAdapter
func (*Relay) MarshalJSON ¶
MarshalJSON implements C.ProxyAdapter
type SelectAble ¶
type Selector ¶
type Selector struct { *GroupBase Hidden bool Icon string // 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) IsL3Protocol ¶
IsL3Protocol 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 ¶
type URLTest struct { *GroupBase Hidden bool Icon string // 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) IsL3Protocol ¶
IsL3Protocol 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