proxy

package
v0.1.102 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 19 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 ...

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 ...

Types

type CustomProxy

type CustomProxy struct {
	Server    *http.Server
	IsErrored bool
}

CustomProxy stores http.Server with field showing there was an error while listening.

func StartProxy

func StartProxy() *CustomProxy

StartProxy starts HTTP/HTTPS proxy for debugging

Jump to

Keyboard shortcuts

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