model

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ConnectCommand = "%s %s %s\r\nHost: %s\r\nProxy-Connection: Keep-Alive\r\n\r\n"

Variables

This section is empty.

Functions

func FilterProxy

func FilterProxy(proxy *HttpProxy) bool

func GetNewFilter

func GetNewFilter(options map[string]string) (f []func(HttpProxy) bool, err error)

Types

type HttpProxy

type HttpProxy struct {
	Ip        string `json:"ip"`
	Port      string `json:"port"`
	Schema    string `json:"schema"`
	Score     int    `json:"score"`
	Latency   int    `json:"latency"`
	From      string `json:"-"`
	Anonymous int    `json:"anonymous"`
	Country   string `json:"country"`
}

func Make

func Make(m map[string]string) (newProxy HttpProxy, err error)

func (*HttpProxy) GetHttpTransport

func (p *HttpProxy) GetHttpTransport() (t *http.Transport, err error)

func (*HttpProxy) GetIp

func (p *HttpProxy) GetIp() string

func (*HttpProxy) GetKey

func (p *HttpProxy) GetKey() string

func (*HttpProxy) GetPort

func (p *HttpProxy) GetPort() string

func (*HttpProxy) GetProxyMap

func (p *HttpProxy) GetProxyMap() map[string]interface{}

func (*HttpProxy) GetProxyUrl

func (p *HttpProxy) GetProxyUrl() string

func (*HttpProxy) GetProxyWithSchema

func (p *HttpProxy) GetProxyWithSchema() string

func (*HttpProxy) IsHttps

func (p *HttpProxy) IsHttps() bool

func (*HttpProxy) SimpleTcpTest

func (p *HttpProxy) SimpleTcpTest(timeOut time.Duration) (err error)

func (*HttpProxy) TestConnectMethod

func (p *HttpProxy) TestConnectMethod(conn net.Conn) (err error)

test http connect method

func (*HttpProxy) TestProxy

func (p *HttpProxy) TestProxy(https bool) (err error)

func (*HttpProxy) TestTcp

func (p *HttpProxy) TestTcp() (conn net.Conn, err error)

test tcp

Jump to

Keyboard shortcuts

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