proxy

package module
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 7 Imported by: 0

README

proxy

TODO

  • Fetch proxies
  • Go routines to filter out transparent proxies
  • Go routines to continuously check latency
  • Priority queue of proxies
  • Proxies have a maximum number of request per seconds to avoid API softbans

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	TimeoutTest time.Duration
	URLTest     string

	StrikeLimit int
	Requests    int
	TimeWindow  time.Duration
	TimeoutGood time.Duration
	// contains filtered or unexported fields
}

func NewDefaultManager

func NewDefaultManager() *Manager

func (*Manager) AddProxies

func (m *Manager) AddProxies(proxies ...string)

func (*Manager) GetGoodProxy

func (m *Manager) GetGoodProxy() (string, *http.Client)

func (*Manager) PunishProxy

func (m *Manager) PunishProxy(proxy string)

func (*Manager) WithAutoProxyTester

func (m *Manager) WithAutoProxyTester(concurrentTest int) *Manager

func (*Manager) WithAutoRefresh

func (m *Manager) WithAutoRefresh(every time.Duration) *Manager

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL