proxy

package
v0.0.0-...-29a3764 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: GPL-3.0 Imports: 26 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 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 GetDirectClient

func GetDirectClient() *http.Client

GetDirectClient ...

func GetProxyURL

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

GetProxyURL ...

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