proxy

package module
v0.0.0-...-ed4807d Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 9 Imported by: 0

README

proxy

Proxy testing tools

This project is highly unstable, and all apis are subject to change.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Judgement

type Judgement struct {
	//Possible values
	// 0: Non Anon: Your ip is known, proxy usage is known
	// 1: Non Anon: Your ip is known, proxy usage unknown
	// 2: Semi Anon: Your ip is unknown, proxy usage known
	// 3: Anon: Your ip is unknown, proxy usage unknown
	AnonType int      `json:"anon_type"`
	Messages []string `json:"messages"`
	Country  string   `json:"country"`
	RealIP   string   `json:"real_ip"`
	RemoteIP net.IP   `json:"remote_ip"`
}

Judgement contains information about a given proxy

func (*Judgement) AppendMessages

func (tr *Judgement) AppendMessages(msg []string)

AppendMessages appends result messages

func (Judgement) MarshalEasyJSON

func (v Judgement) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Judgement) MarshalJSON

func (v Judgement) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Judgement) UnmarshalEasyJSON

func (v *Judgement) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Judgement) UnmarshalJSON

func (v *Judgement) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Proxy

type Proxy struct {
	IP   string `json:"ip"`
	Port int    `json:"port"`
	Type int    `json:"type,omitempty"`
}

Proxy represent an proxy object containing ip, port, and the proxy type

func FromIpv4String

func FromIpv4String(proxyString string) (*Proxy, error)

FromIpv4String converts ipv4 string (xxx.xx.xxx.xxx:xxxxx) to a Proxy object

func (Proxy) MarshalEasyJSON

func (v Proxy) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Proxy) MarshalJSON

func (v Proxy) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Proxy) ToString

func (v *Proxy) ToString() string

ToString converts proxy to ip:port format

func (*Proxy) UnmarshalEasyJSON

func (v *Proxy) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Proxy) UnmarshalJSON

func (v *Proxy) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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