Documentation ¶
Index ¶
- type Proxy
- func (p *Proxy) Alive() bool
- func (p *Proxy) DelayHistory() []constant.DelayHistory
- func (p *Proxy) Dial(metadata *constant.Metadata) (constant.Conn, error)
- func (p *Proxy) DialContext(ctx context.Context, metadata *constant.Metadata, opts ...dialer.Option) (constant.Conn, error)
- func (p *Proxy) DialUDP(metadata *constant.Metadata) (constant.PacketConn, error)
- func (p *Proxy) LastDelay() (delay uint16)
- func (p *Proxy) ListenPacketContext(ctx context.Context, metadata *constant.Metadata, opts ...dialer.Option) (constant.PacketConn, error)
- func (p *Proxy) MarshalJSON() ([]byte, error)
- func (p *Proxy) URLTest(ctx context.Context, url string) (t uint16, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct { constant.ProxyAdapter // contains filtered or unexported fields }
func NewProxy ¶
func NewProxy(adapter constant.ProxyAdapter) *Proxy
func (*Proxy) DelayHistory ¶
func (p *Proxy) DelayHistory() []constant.DelayHistory
DelayHistory implements constantProxy
func (*Proxy) DialContext ¶
func (p *Proxy) DialContext(ctx context.Context, metadata *constant.Metadata, opts ...dialer.Option) (constant.Conn, error)
DialContext implements constant.ProxyAdapter
func (*Proxy) LastDelay ¶
LastDelay return last history record. if proxy is not alive, return the max value of uint16. implements constant.Proxy
func (*Proxy) ListenPacketContext ¶
func (p *Proxy) ListenPacketContext(ctx context.Context, metadata *constant.Metadata, opts ...dialer.Option) (constant.PacketConn, error)
ListenPacketContext implements constant.ProxyAdapter
func (*Proxy) MarshalJSON ¶
MarshalJSON implements constant.ProxyAdapter
Click to show internal directories.
Click to hide internal directories.