Documentation
¶
Index ¶
Constants ¶
View Source
const UnknownAddr = "unknown"
Variables ¶
This section is empty.
Functions ¶
func ToProxyResponse ¶
func ToProxyResponse(pRes proxyAdapters.ResponseReaderAdapter, acceptEncodingHeader string) (*px.Response, error)
ToProxyResponse converts a ProxyResponse into a MITM proxy response object (with content encoding matching the new req) Because all responses are stored as uncompressed strings, the cached response might need to be encoded before being sent
Types ¶
type ConnectionStatsAdapter ¶
type ConnectionStatsAdapter struct {
// contains filtered or unexported fields
}
func NewProxyConnectionStatsAdapter ¶
func NewProxyConnectionStatsAdapter(f *px.Flow) *ConnectionStatsAdapter
func (*ConnectionStatsAdapter) GetClientIP ¶
func (cs *ConnectionStatsAdapter) GetClientIP() string
func (*ConnectionStatsAdapter) GetProxyID ¶
func (cs *ConnectionStatsAdapter) GetProxyID() string
func (*ConnectionStatsAdapter) GetRequestURL ¶
func (cs *ConnectionStatsAdapter) GetRequestURL() string
type FlowAdapter ¶
type FlowAdapter struct {
// contains filtered or unexported fields
}
FlowAdapter implements the proxyAdapters.ProxyFlowReaderAdapter interface
func NewFlowAdapter ¶
func NewFlowAdapter(f *px.Flow) *FlowAdapter
func (*FlowAdapter) GetConnectionStats ¶
func (fa *FlowAdapter) GetConnectionStats() proxyAdapters.ConnectionStatsReaderAdapter
func (*FlowAdapter) GetRequest ¶
func (fa *FlowAdapter) GetRequest() proxyAdapters.RequestReaderAdapter
func (*FlowAdapter) GetResponse ¶
func (fa *FlowAdapter) GetResponse() proxyAdapters.ResponseReaderAdapter
type ProxyRequestAdapter ¶
type ProxyRequestAdapter struct {
// contains filtered or unexported fields
}
ProxyRequestAdapter is a RequestAdapter implementation for mitmproxy requests
func NewProxyRequestAdapter ¶
func NewProxyRequestAdapter(pxReq *px.Request) *ProxyRequestAdapter
func (*ProxyRequestAdapter) GetBodyBytes ¶
func (r *ProxyRequestAdapter) GetBodyBytes() []byte
func (*ProxyRequestAdapter) GetHeaders ¶
func (r *ProxyRequestAdapter) GetHeaders() http.Header
func (*ProxyRequestAdapter) GetMethod ¶
func (r *ProxyRequestAdapter) GetMethod() string
func (*ProxyRequestAdapter) GetProto ¶
func (r *ProxyRequestAdapter) GetProto() string
func (*ProxyRequestAdapter) GetURL ¶
func (r *ProxyRequestAdapter) GetURL() *url.URL
type ProxyResponseAdapter ¶
type ProxyResponseAdapter struct {
// contains filtered or unexported fields
}
func NewProxyResponseAdapter ¶
func NewProxyResponseAdapter(pxResp *px.Response) *ProxyResponseAdapter
func (*ProxyResponseAdapter) GetBodyBytes ¶
func (r *ProxyResponseAdapter) GetBodyBytes() []byte
func (*ProxyResponseAdapter) GetHeaders ¶
func (r *ProxyResponseAdapter) GetHeaders() http.Header
func (*ProxyResponseAdapter) GetStatusCode ¶
func (r *ProxyResponseAdapter) GetStatusCode() int
Click to show internal directories.
Click to hide internal directories.