biri

package module
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 7 Imported by: 2

README

Biri

Package that provide http.Client that will use a http proxy.

Quickstart

  biri.ProxyStart()
  
  proxy := biri.GetClient()
  resp, _ := proxy.Client.Get(url)
  biri.Done()

Manage proxy by yourself

You can readd a proxy after a successful request with:

  proxy.Readd()

or you can ban it if the request did not worked:

  proxy.Ban()

Configuration

Here the basic default configuration:

  var Config = &config{
    proxyWebpage:           "https://free-proxy-list.net/",
    PingServer:             "https://www.google.com/",
    TickMinuteDuration:     3,
    numberAvailableProxies: 30,
    Verbose:                1,
  }

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = &config{
	proxyWebpage:           "https://free-proxy-list.net/",
	PingServer:             "https://www.google.com/",
	TickMinuteDuration:     3,
	numberAvailableProxies: 30,
	Verbose:                1,
}

Config configuration

View Source
var SkipProxies = []string{}

SkipProxies contains not working proxies rip

Functions

func Done

func Done()

Done stop ticker and channels

func ProxyStart

func ProxyStart()

ProxyStart start channels

Types

type Proxy

type Proxy struct {
	Info   string
	Client *http.Client
}

Proxy handle proxy things

func GetClient

func GetClient() *Proxy

GetClient return client with proxy

func (*Proxy) Ban

func (p *Proxy) Ban()

Ban proxy

func (*Proxy) Readd

func (p *Proxy) Readd()

Readd good proxy

Jump to

Keyboard shortcuts

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