proxy

package
v0.0.0-...-e25df3e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SequenceId = 0
)

Functions

func ResponseConnect

func ResponseConnect(w http.ResponseWriter) net.Conn

Types

type Proxy

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

func NewProxy

func NewProxy(sslmitm bool, port int, Certfile, Keyfile string) *Proxy

func (*Proxy) MitmRequest

func (p *Proxy) MitmRequest(w http.ResponseWriter, r *http.Request)

func (*Proxy) ProxyHTTPRequest

func (p *Proxy) ProxyHTTPRequest(w http.ResponseWriter, r *http.Request)

func (*Proxy) ProxyHTTPSRequest

func (p *Proxy) ProxyHTTPSRequest(w http.ResponseWriter, r *http.Request, conn net.Conn)

func (*Proxy) RelayHTTPSRequest

func (p *Proxy) RelayHTTPSRequest(w http.ResponseWriter, r *http.Request)

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Proxy) WriteResponse

func (p *Proxy) WriteResponse(w http.ResponseWriter, res *http.Response)

type RequestResponsePair

type RequestResponsePair struct {
	Id       int
	TempDir  string
	Request  http.Request
	Response http.Response
}

func NewRequestResponsePair

func NewRequestResponsePair() *RequestResponsePair

func (*RequestResponsePair) DumpRequest

func (rpair *RequestResponsePair) DumpRequest() (string, error)

func (*RequestResponsePair) DumpResponse

func (rpair *RequestResponsePair) DumpResponse() (string, error)

func (*RequestResponsePair) GetRequestBody

func (rpair *RequestResponsePair) GetRequestBody() (string, error)

func (*RequestResponsePair) SetRequest

func (rpair *RequestResponsePair) SetRequest(r http.Request)

func (*RequestResponsePair) SetResponse

func (rpair *RequestResponsePair) SetResponse(r http.Response)

Jump to

Keyboard shortcuts

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