proxy

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadCaHandlerFunc

func DownloadCaHandlerFunc(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response)

func SetCA

func SetCA(caCert, caKey []byte) error

Types

type Config

type Config struct {
	Addr        string
	Verbose     bool     // porxy 代理日志
	TargetHosts []string // 指定目标主机,将忽略其他主机;默认为所有
	ParentProxy string   // 请求的代理
	CaHost      string
}

type LogrusLogger

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

func (LogrusLogger) Printf

func (l LogrusLogger) Printf(format string, v ...interface{})

type MitmServer

type MitmServer struct {
	C <-chan httpdump.Request
	// contains filtered or unexported fields
}

func NewMitmServer

func NewMitmServer(conf Config) *MitmServer

func (*MitmServer) ListenAndServe

func (m *MitmServer) ListenAndServe() error

func (*MitmServer) MakeOnResponse

func (m *MitmServer) MakeOnResponse(c chan httpdump.Request) func(resp *http.Response, ctx *goproxy.ProxyCtx) *http.Response

func (*MitmServer) OnRequest

func (m *MitmServer) OnRequest(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response)

func (*MitmServer) SetParentProxy

func (m *MitmServer) SetParentProxy(parentProxy string)

func (*MitmServer) Shutdown

func (m *MitmServer) Shutdown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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