webproxy

package module
v0.0.0-...-f6347bf Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2018 License: GPL-3.0 Imports: 18 Imported by: 0

README

Webproxy provides a mechanism to sniff the http/https sessions by implementing the sniff interface. To decrypt the https session, rootcert.cer is necessary to install into the trusted root store.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRoutineCount

func GetRoutineCount() int32

Types

type Proxy

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

func NewProxy

func NewProxy(p int, s Sniffer) *Proxy

func (*Proxy) Start

func (this *Proxy) Start()

type Session

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

func NewSession

func NewSession(conn net.Conn) *Session

func (*Session) GetHost

func (this *Session) GetHost() string

func (*Session) GetLocalData

func (this *Session) GetLocalData() interface{}

func (*Session) GetMethod

func (this *Session) GetMethod() string

func (*Session) GetRequestBody

func (this *Session) GetRequestBody() string

func (*Session) GetRequestEncoding

func (this *Session) GetRequestEncoding() string

func (*Session) GetRequestHead

func (this *Session) GetRequestHead() http.Header

func (*Session) GetRequestProto

func (this *Session) GetRequestProto() string

func (*Session) GetRequestURL

func (this *Session) GetRequestURL() string

func (*Session) GetResponseBody

func (this *Session) GetResponseBody() string

Call this func if it is really necessary, because of memory consuming for large response

func (*Session) GetResponseEncoding

func (this *Session) GetResponseEncoding() string

func (*Session) GetResponseHead

func (this *Session) GetResponseHead() http.Header

func (*Session) GetResponseProto

func (this *Session) GetResponseProto() string

func (*Session) GetResponseType

func (this *Session) GetResponseType() string

func (*Session) GetStatus

func (this *Session) GetStatus() string

func (*Session) SetLocalData

func (this *Session) SetLocalData(data interface{})

func (*Session) SetRequestBody

func (this *Session) SetRequestBody(body string)

func (*Session) SetResponseBody

func (this *Session) SetResponseBody(body string)

type Sniffer

type Sniffer interface {
	BeforeRequest(*Session)
	BeforeResponse(*Session)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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