falcon

package module
v0.0.0-...-1370a5c Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Falcon

License

Falcon is a proxy verifying library made in Go

Features

  • Supports SOCKS5/4/4A & HTTP
  • Proxy information lookup
  • Full channel control
  • 2 external dependencies

Examples

Check examples directory

Disclaimer

Developers are not responsible for any misuse

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transport

func Transport(proxy string) (string, *http.Transport, error)

Transport will return a http.Transport for the proxy protocol

Types

type Channels

type Channels struct {
	// Incoming verified SOCKS5 proxies
	SOCKS5 chan *Lookup
	// Incoming verified SOCKS4 proxies
	SOCKS4 chan *Lookup
	// Incoming verified SOCKS4A proxies
	SOCKS4A chan *Lookup
	// Incoming verified HTTP proxies
	HTTP chan *Lookup
	// Incoming errors
	Error chan error
}

Channels represents incoming proxy channels

func (*Channels) Verify

func (c *Channels) Verify(proxy string, timeout time.Duration)

Verify will verify a proxy

type Falcon

type Falcon struct {
	// Pool workers
	Workers int
	// Proxy timeout (default: 10)
	Timeout time.Duration
	// Proxy list
	Proxies []string
	// Running status
	Running bool
	// Proxy channels
	*Channels
	// contains filtered or unexported fields
}

Falcon represents a proxy checker

func New

func New(workers int) *Falcon

New will return a default Falcon

func (*Falcon) Start

func (f *Falcon) Start() error

Start will start the proxy checker

func (*Falcon) Stop

func (f *Falcon) Stop() error

Stop will stop the proxy checker

type Lookup

type Lookup struct {
	Protocol string `json:"protocol"`
	IP       string `json:"ip"`
	Port     int    `json:"port"`

	Status        string  `json:"status"`
	Continent     string  `json:"continent"`
	ContinentCode string  `json:"continentCode"`
	Country       string  `json:"country"`
	CountryCode   string  `json:"countryCode"`
	Region        string  `json:"region"`
	RegionName    string  `json:"regionName"`
	City          string  `json:"city"`
	District      string  `json:"district"`
	Zip           string  `json:"zip"`
	Lat           float64 `json:"lat"`
	Lon           float64 `json:"lon"`
	Timezone      string  `json:"timezone"`
	Offset        int     `json:"offset"`
	Currency      string  `json:"currency"`
	Isp           string  `json:"isp"`
	Org           string  `json:"org"`
	As            string  `json:"as"`
	Asname        string  `json:"asname"`
	Mobile        bool    `json:"mobile"`
	Proxy         bool    `json:"proxy"`
	Hosting       bool    `json:"hosting"`
	Query         string  `json:"query"`
}

Lookup represents a proxy lookup

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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