Documentation ¶
Index ¶
- Constants
- Variables
- func RemoveHopByHopRequestHeaders(header http.Header)
- func RemoveWebsocketRequestHeaders(header http.Header)
- type Flow
- type HTTPDelegatedInvoker
- type HTTPDelegatedInvokerFunc
- type HTTPFlow
- type HTTPRequestView
- type HTTPResponseView
- type HTTPView
- type ImmutableHTTPInterceptor
- type ImmutableWebsocketInterceptor
- type MimtOption
- type MitmHandler
- type MutableHTTPInterceptor
- type MutableWebsocketInterceptor
- type ReqContext
- type ReqContextKey
- type WSDirection
- type WSFlow
- type WebsocketDelegatedInvoker
- type WebsocketDelegatedInvokerFunc
Constants ¶
View Source
const ( HttpHeaderContentType = "Content-Type" HttpHeaderConnection = "Connection" HttpHeaderKeepAlive = "Keep-Alive" HttpHeaderProxyAuthenticate = "Proxy-Authenticate" HttpHeaderProxyAuthorization = "Proxy-Authorization" HttpHeaderProxyConnection = "Proxy-Connection" HttpHeaderProxyAgent = "Proxy-Agent" HttpHeaderTe = "Te" HttpHeaderTrailers = "Trailers" HttpHeaderTransferEncoding = "Transfer-Encoding" HttpHeaderUpgrade = "Upgrade" HttpHeaderSecWebsocketKey = "Sec-Websocket-Key" HttpHeaderSecWebsocketVersion = "Sec-Websocket-Version" HttpHeaderSecWebsocketExtensions = "Sec-Websocket-Extensions" HttpHeaderContentEncoding = "Content-Encoding" HttpHeaderContentLength = "Content-Length" )
Variables ¶
View Source
var ( ReqCtxKey = ReqContextKey{} EmptyReqCtx = ReqContext{} )
Functions ¶
Types ¶
type HTTPDelegatedInvoker ¶
type HTTPFlow ¶ added in v1.1.0
func (*HTTPFlow) DumpHTTPRequestView ¶ added in v1.1.0
func (f *HTTPFlow) DumpHTTPRequestView() (*HTTPRequestView, error)
func (*HTTPFlow) DumpHTTPResponseView ¶ added in v1.1.0
func (f *HTTPFlow) DumpHTTPResponseView() (*HTTPResponseView, error)
func (*HTTPFlow) DumpHTTPView ¶ added in v1.1.0
type HTTPRequestView ¶ added in v1.1.0
type HTTPRequestView struct { Method string Uri string Proto string Header http.Header Body []byte }
func (*HTTPRequestView) Encode ¶ added in v1.1.0
func (v *HTTPRequestView) Encode() []byte
type HTTPResponseView ¶ added in v1.1.0
func (*HTTPResponseView) Encode ¶ added in v1.1.0
func (v *HTTPResponseView) Encode() []byte
type HTTPView ¶ added in v1.1.0
type HTTPView struct { Request *HTTPRequestView Response *HTTPResponseView }
type ImmutableWebsocketInterceptor ¶
type ImmutableWebsocketInterceptor func(WSDirection, *http.Request, int, []byte)
type MimtOption ¶
type MitmHandler ¶
type MitmHandler interface { SetMutableHTTPInterceptor(MutableHTTPInterceptor) SetImmutableHTTPInterceptor(ImmutableHTTPInterceptor) SetMutableWebsocketInterceptor(MutableWebsocketInterceptor) SetImmutableWebsocketInterceptor(ImmutableWebsocketInterceptor) HandleMIMT(context.Context, net.Conn) error CAPath() string }
func NewMitmHandler ¶
func NewMitmHandler(opt MimtOption) (MitmHandler, error)
type MutableHTTPInterceptor ¶
type MutableWebsocketInterceptor ¶
type MutableWebsocketInterceptor func(WSDirection, *http.Request, int, []byte, WebsocketDelegatedInvoker) error
type ReqContext ¶
type ReqContextKey ¶
type ReqContextKey struct{}
type WSFlow ¶ added in v1.1.0
type WSFlow struct { Direction WSDirection Request *http.Request MsgType int FramedData []byte }
Click to show internal directories.
Click to hide internal directories.