proxymanager

package
v0.0.0-...-0b269b6 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyManager

type ProxyManager struct {
	CurrentIndex int

	Length  int
	Proxies []string
	// contains filtered or unexported fields
}

ProxyManager defines the proxy list and current proxy position

func New

func New(filename string) (*ProxyManager, error)

New initialize ProxyManager

func (*ProxyManager) NextProxy

func (p *ProxyManager) NextProxy() string

NextProxy will navigate the next proxy to use

func (*ProxyManager) RandomProxy

func (p *ProxyManager) RandomProxy() string

RandomProxy will choose a proxy randomly from the list

func (*ProxyManager) Reload

func (p *ProxyManager) Reload() error

Reload proxy pool

func (*ProxyManager) Watch

func (p *ProxyManager) Watch() (*fsnotify.Watcher, error)

Watch proxy file from events

Jump to

Keyboard shortcuts

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