scrape

package
v0.0.0-...-a6eb964 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Proxy ...
	Proxy = goproxy.NewProxyHttpServer()

	// ProxyPort ...
	ProxyPort = 65222
)
View Source
var AlwaysHTTPMitm goproxy.FuncHttpsHandler = func(host string, ctx *goproxy.ProxyCtx) (*goproxy.ConnectAction, string) {
	return &goproxy.ConnectAction{Action: goproxy.ConnectMitm, TLSConfig: CustomTLS(&goproxy.GoproxyCa)}, host
}

AlwaysHTTPMitm ...

View Source
var (
	// PacParser ...
	PacParser = &PacStorage{}
)

Functions

func CloudflareResolver

func CloudflareResolver() *net.Resolver

CloudflareResolver returns Resolver that uses Cloudflare service on 1.1.1.1 and 1.0.0.1 on port 853.

See https://developers.cloudflare.com/1.1.1.1/dns-over-tls/ for details.

func CustomDial

func CustomDial(network, addr string) (net.Conn, error)

CustomDial ...

func CustomDialContext

func CustomDialContext(ctx context.Context, network, addr string) (net.Conn, error)

CustomDialContext ...

func CustomTLS

func CustomTLS(ca *tls.Certificate) func(host string, ctx *goproxy.ProxyCtx) (*tls.Config, error)

CustomTLS ...

func GetClient

func GetClient() *http.Client

GetClient ...

func GetProxyURL

func GetProxyURL(fixedURL *url.URL) func(*http.Request) (*url.URL, error)

GetProxyURL ...

func GoogleResolver

func GoogleResolver() *net.Resolver

GoogleResolver returns Resolver that uses Google Public DNS service on 8.8.8.8 and 8.8.4.4 on port 853.

See https://developers.google.com/speed/public-dns/ for details.

func OpennicResolver

func OpennicResolver() *net.Resolver

OpennicResolver returns Resolver that uses Opennic Public DNS service on port 853.

See https://servers.opennicproject.org/ for details.

func Quad9Resolver

func Quad9Resolver() *net.Resolver

Quad9Resolver returns Resolver that uses Quad9 service on 9.9.9.9 and 149.112.112.112 on port 853.

See https://quad9.net/faq/ for details.

func Reload

func Reload()

Reload ...

func StartProxy

func StartProxy() *http.Server

StartProxy starts HTTP/HTTPS proxy for debugging

Types

type PacStorage

type PacStorage struct {
	// contains filtered or unexported fields
}

PacStorage ...

func (*PacStorage) FindProxy

func (p *PacStorage) FindProxy(query string) (res string, err error)

FindProxy ...

func (*PacStorage) GetFileData

func (p *PacStorage) GetFileData() string

GetFileData ...

func (*PacStorage) Update

func (p *PacStorage) Update()

Update ...

Jump to

Keyboard shortcuts

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