Documentation
¶
Index ¶
- func GetIP(url string) net.IP
- type Information
- type Manager
- func (m *Manager) AddBadProxy(key string)
- func (m *Manager) AddProxy(key string, client *http.Client)
- func (m *Manager) GetProxies() ([]*url.URL, error)
- func (m *Manager) GetRandomClient() (*http.Client, string)
- func (m *Manager) GratzProxy(key string)
- func (m *Manager) IsProxyBad(key string) bool
- func (m *Manager) RemoveProxy(key string)
- func (m *Manager) TestProxies() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
Proxies []*url.URL
LastFetch time.Time
ProxyRefresh time.Duration
Fetchers []func() ([]*url.URL, error)
Timeout time.Duration
MaxConcurrency int
Filter float64
URLTest string
GoodProxies map[string]*http.Client
ProxiesScore map[string]*Information
Mtx sync.Mutex
}
Manager ...
func (*Manager) AddBadProxy ¶
AddBadProxy adds a proxy to the map of bat proxies
func (*Manager) GetRandomClient ¶
GetRandomClient ...
func (*Manager) GratzProxy ¶
GratzProxy congratz a proxy for working
func (*Manager) RemoveProxy ¶
RemoveProxy removes a proxy from the map of good proxies
func (*Manager) TestProxies ¶
TestProxies will populate goodproxies with proxies passing the test
Click to show internal directories.
Click to hide internal directories.