Versions in this module Expand all Collapse all v0 v0.1.0 Apr 4, 2026 Changes in this version + type Dialer struct + func (d *Dialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) + type Filter func(*Proxy) bool + func Sticky(key string, ttl time.Duration) Filter + func WithASN(asns ...string) Filter + func WithAlive() Filter + func WithCity(cities ...string) Filter + func WithCountry(codes ...string) Filter + func WithMaxLatency(d time.Duration) Filter + func WithProtocol(proto Protocol) Filter + type HealthChecker struct + type Option func(*poolConfig) + func WithEWMADecay(alpha float64) Option + func WithHealthCheck(interval, timeout time.Duration) Option + func WithHealthCheckURL(url string) Option + func WithMaxBackoff(d time.Duration) Option + func WithStrategy(s Strategy) Option + type Pool struct + func New(opts ...Option) *Pool + func (p *Pool) Add(rawURL string, opts ...ProxyOption) error + func (p *Pool) AddMany(rawURLs []string, opts ...ProxyOption) error + func (p *Pool) Alive() []*Proxy + func (p *Pool) Close() + func (p *Pool) DialContext(ctx context.Context, network, addr string) (net.Conn, error) + func (p *Pool) Get(filters ...Filter) (*Proxy, error) + func (p *Pool) NewDialer(filters ...Filter) *Dialer + func (p *Pool) Remove(rawURL string) + func (p *Pool) RoundTripper(filters ...Filter) http.RoundTripper + func (p *Pool) Stats() PoolStats + type PoolStats struct + Alive int + AvgLatency time.Duration + Countries map[string]int + Dead int + Protocols map[Protocol]int + Total int + type Protocol int + const HTTP + const SOCKS4 + const SOCKS5 + func (p Protocol) String() string + type Proxy struct + ASN string + City string + Country string + Protocol Protocol + URL *url.URL + func ParseProxy(raw string) (*Proxy, error) + func ParseProxyList(r io.Reader) ([]*Proxy, error) + func (p *Proxy) Addr() string + func (p *Proxy) Alive() bool + func (p *Proxy) Backoff() time.Duration + func (p *Proxy) FailCount() int64 + func (p *Proxy) LastCheck() time.Time + func (p *Proxy) Latency() time.Duration + func (p *Proxy) SuccessCount() int64 + type ProxyOption func(*Proxy) + func InCity(city string) ProxyOption + func InCountry(code string) ProxyOption + func WithASNTag(asn string) ProxyOption + type Strategy interface + Select func(proxies []*Proxy) *Proxy + func LeastLatency() Strategy + func P2C() Strategy + func Random() Strategy + func RoundRobin() Strategy