Documentation
¶
Index ¶
- Constants
- func AppendMatchedRule(req *http.Request, rule ...*ypb.MITMContentReplacer)
- func GetBareRequestBytes(r *http.Request) []byte
- func GetBareResponseBytes(r *http.Request) []byte
- func GetContextAnyFromRequest(r *http.Request, key string) any
- func GetContextBoolInfoFromRequest(r *http.Request, key string) bool
- func GetContextInfoMap(r *http.Request) *sync.Map
- func GetContextIntInfoFromRequest(r *http.Request, key string) int
- func GetContextStringInfoFromRequest(r *http.Request, key string) string
- func GetFlowTags(r *http.Request) []string
- func GetHijackedRequestBytes(r *http.Request) []byte
- func GetHijackedResponseBytes(r *http.Request) []byte
- func GetMITMFrontendReadWriter(r *http.Request) io.ReadWriter
- func GetMITMSkipFrontendFeedback(r *http.Request) bool
- func GetMatchedRule(req *http.Request) []*ypb.MITMContentReplacer
- func GetPlainRequestBytes(r *http.Request) []byte
- func GetPlainResponseBytes(r *http.Request) []byte
- func GetRemoteAddr(r *http.Request) string
- func GetRequestBytes(r *http.Request) []byte
- func GetRequestHTTPS(r *http.Request) bool
- func GetRequestIsModified(req *http.Request) bool
- func GetRequestReaderOffset(r *http.Request) int
- func GetRequestTimestamp(r *http.Request) time.Time
- func GetRequestTooLarge(req *http.Request) bool
- func GetRequestURL(req *http.Request) string
- func GetRequestViaCONNECT(req *http.Request) bool
- func GetRequestViewedByUser(req *http.Request) bool
- func GetResponseBodySize(req *http.Request) int64
- func GetResponseBytes(r *http.Request) []byte
- func GetResponseContentTypeFiltered(req *http.Request) func(contentType string) bool
- func GetResponseHeaderWriter(req *http.Request) io.Writer
- func GetResponseIsModified(req *http.Request) bool
- func GetResponseMaxContentLength(req *http.Request) int
- func GetResponseTimestamp(r *http.Response) time.Time
- func GetResponseTooLarge(req *http.Request) bool
- func GetResponseTooLargeBodyFile(req *http.Request) string
- func GetResponseTooLargeHeaderFile(req *http.Request) string
- func GetResponseTooLargeSize(req *http.Request) int64
- func GetResponseTraceInfo(req *http.Request) any
- func GetResponseViewedByUser(req *http.Request) bool
- func IsFiltered(req *http.Request) bool
- func IsResponseFiltered(req *http.Request) bool
- func SetBareRequestBytes(r *http.Request, bytes []byte)
- func SetBareResponseBytes(r *http.Request, bytes []byte)
- func SetBareResponseBytesForce(r *http.Request, bytes []byte)
- func SetContextValueInfoFromRequest(r *http.Request, key string, value any)
- func SetFlowTags(r *http.Request, tags []string)
- func SetHijackedRequestBytes(r *http.Request, bytes []byte)
- func SetHijackedResponseBytes(r *http.Request, bytes []byte)
- func SetMITMFrontendReadWriter(r *http.Request, rw io.ReadWriter)
- func SetMITMSkipFrontendFeedback(r *http.Request, b bool)
- func SetMatchedRule(req *http.Request, rule []*ypb.MITMContentReplacer)
- func SetPlainRequestBytes(r *http.Request, bytes []byte)
- func SetPlainResponseBytes(r *http.Request, bytes []byte)
- func SetRemoteAddr(r *http.Request, addr string)
- func SetRequestHTTPS(r *http.Request, b bool)
- func SetRequestModified(req *http.Request, by ...string)
- func SetRequestReaderOffset(r *http.Request, offset int)
- func SetRequestTimestamp(r *http.Request, ts time.Time)
- func SetRequestTooLarge(req *http.Request, b bool)
- func SetRequestURL(req *http.Request, urlStr string)
- func SetRequestViaCONNECT(req *http.Request, b bool)
- func SetRequestViewedByUser(req *http.Request)
- func SetResponseBodySize(req *http.Request, i int64)
- func SetResponseContentTypeFiltered(req *http.Request, matcher func(contentType string) bool)
- func SetResponseFinishedCallback(req *http.Request, h ResponseFinishedCallbackType)
- func SetResponseHeaderCallback(req *http.Request, callback ResponseHeaderCallbackType)
- func SetResponseHeaderParsed(r *http.Request, cb ResponseHeaderParsedCallback)
- func SetResponseHeaderWriter(req *http.Request, w io.Writer)
- func SetResponseMaxContentLength(req *http.Request, length int)
- func SetResponseModified(req *http.Request, by ...string)
- func SetResponseTimestamp(r *http.Response, ts time.Time)
- func SetResponseTooLarge(req *http.Request, b bool)
- func SetResponseTooLargeBodyFile(req *http.Request, b string)
- func SetResponseTooLargeHeaderFile(req *http.Request, b string)
- func SetResponseTooLargeSize(req *http.Request, size int64)
- func SetResponseTraceInfo(req *http.Request, info any)
- func SetResponseViewedByUser(req *http.Request)
- type ResponseFinishedCallbackType
- type ResponseHeaderCallbackType
- type ResponseHeaderParsedCallback
Constants ¶
View Source
const ( REQUEST_CONTEXT_KEY_IsHttps = "isHttps" REQUEST_CONTEXT_KEY_IsDropped = "isRequestDropped" RESPONSE_CONTEXT_KEY_IsDropped = "isResponseDropped" RESPONSE_CONTEXT_NOLOG = "isResponseNoLog" REQUEST_CONTEXT_KEY_AutoFoward = "isRequestAutoForward" RESPONSE_CONTEXT_KEY_AutoFoward = "isResponseAutoForward" REQUEST_CONTEXT_KEY_Url = "url" REQUEST_CONTEXT_KEY_Tags = "flowTags" REQUEST_CONTEET_KEY_Timestamp = "timestamp_request" REQUEST_CONTEXT_KEY_ReaderOffset = "req_reader_offset" RESPONSE_CONTEXT_KEY_ReaderOffset = "rsp_reader_offset" RESPONSE_CONTEXT_KEY_Timestamp = "timestamp_response" REQUEST_CONTEXT_KEY_RequestIsModified = "requestIsModified" REQUEST_CONTEXT_KEY_ResponseIsModified = "responseIsModified" REQUEST_CONTEXT_KEY_RequestModifiedBy = "requestIsModifiedBy" REQUEST_CONTEXT_KEY_ResponseModifiedBy = "responseIsModifiedBy" REQUEST_CONTEXT_KEY_RequestIsFiltered = "requestIsFiltered" RESPONSE_CONTEXT_KEY_ResponseIsFiltered = "responseIsFiltered" REQUEST_CONTEXT_KEY_RequestIsViewedByUser = "requestIsHijacked" REQUEST_CONTEXT_KEY_ResponseIsViewedByUser = "responseIsHijacked" REQUEST_CONTEXT_KEY_RequestBareBytes = "requestBareBytes" REQUEST_CONTEXT_KEY_RequestHijackedBytes = "requestHijackedBytes" REQUEST_CONTEXT_KEY_RequestPlainBytes = "requestPlainBytes" REQUEST_CONTEXT_KEY_ResponseBareBytes = "responseBareBytes" REQUEST_CONTEXT_KEY_ResponsePlainBytes = "responsePlainBytes" REQUEST_CONTEXT_KEY_ResponseHijackedBytes = "responseHijackedBytes" REQUEST_CONTEXT_KEY_RequestIsStrippedGzip = "requestIsStrippedGzip" RESPONSE_CONTEXT_KEY_ShouldBeHijackedFromRequest = "shouldBeHijackedFromRequest" REQUEST_CONTEXT_KEY_ConnectedTo = "connectedTo" REQUEST_CONTEXT_KEY_ConnectedToPort = "connectedToPort" REQUEST_CONTEXT_KEY_ConnectedToHost = "connectedToHost" REQUEST_CONTEXT_KEY_RemoteAddr = "remoteAddr" REQUEST_CONTEXT_KEY_ViaConnect = "viaConnect" REQUEST_CONTEXT_KEY_ResponseHeaderCallback = "responseHeaderCallback" REQUEST_CONTEXT_KEY_ResponseHeaderWriter = "responseHeaderWriter" REQUEST_CONTEXT_KEY_ResponseMaxContentLength = "responseMaxContentLength" REQUEST_CONTEXT_KEY_ResponseTraceInfo = "responseTraceInfo" REQUEST_CONTEXT_KEY_ResponseTooLarge = "responseTooLarge" REQUEST_CONTEXT_KEY_RequestTooLarge = "requestTooLarge" REQUEST_CONTEXT_KEY_ResponseHeaderParsed = "responseHeaderParsed" REQUEST_CONTEXT_KEY_ResponseContentTypeFiltered = "ResponseContentTypeFiltered" REQUEST_CONTEXT_KEY_MitmFrontendReadWriter = "mitmFrontendReadWriter" REQUEST_CONTEXT_KEY_MitmSkipFrontendFeedback = "mitmSkipFrontendFeedback" REQUEST_CONTEXT_KEY_ResponseFinishedCallback = "responseFinishedCallback" REQUEST_CONTEXT_KEY_ResponseTooLargeHeaderFile = "ResponseTooLargeHeaderFile" REQUEST_CONTEXT_KEY_ResponseTooLargeBodyFile = "ResponseTooLargeBodyFile" REQUEST_CONTEXT_KEY_ResponseBodySize = "ResponseBodySize" REQUEST_CONTEXT_KEY_MatchedRules = "MatchedRules" )
View Source
const REQUEST_CONTEXT_INFOMAP = "InfoMap"
Variables ¶
This section is empty.
Functions ¶
func AppendMatchedRule ¶ added in v1.2.6
func AppendMatchedRule(req *http.Request, rule ...*ypb.MITMContentReplacer)
func GetBareRequestBytes ¶ added in v1.2.6
func GetBareResponseBytes ¶ added in v1.2.6
func GetContextAnyFromRequest ¶ added in v1.2.6
func GetFlowTags ¶ added in v1.3.0
func GetHijackedRequestBytes ¶ added in v1.2.6
func GetHijackedResponseBytes ¶ added in v1.2.6
func GetMITMFrontendReadWriter ¶ added in v1.2.8
func GetMITMFrontendReadWriter(r *http.Request) io.ReadWriter
GetMITMFrontendReadWriter gets the mitm frontend read writer
func GetMITMSkipFrontendFeedback ¶ added in v1.2.8
GetMITMSkipFrontendFeedback gets the mitm frontend read writer
func GetMatchedRule ¶ added in v1.2.6
func GetMatchedRule(req *http.Request) []*ypb.MITMContentReplacer
func GetPlainRequestBytes ¶ added in v1.2.6
func GetPlainResponseBytes ¶ added in v1.2.6
func GetRemoteAddr ¶ added in v1.2.6
func GetRequestBytes ¶
func GetRequestHTTPS ¶
func GetRequestIsModified ¶ added in v1.2.6
func GetRequestReaderOffset ¶ added in v1.3.2
func GetRequestTooLarge ¶ added in v1.2.8
func GetRequestURL ¶ added in v1.2.6
func GetRequestViaCONNECT ¶ added in v1.2.7
func GetRequestViewedByUser ¶ added in v1.2.6
func GetResponseBodySize ¶ added in v1.2.8
func GetResponseBytes ¶ added in v1.3.3
func GetResponseContentTypeFiltered ¶ added in v1.2.8
func GetResponseHeaderWriter ¶ added in v1.2.8
func GetResponseIsModified ¶ added in v1.2.6
func GetResponseMaxContentLength ¶ added in v1.2.8
func GetResponseTooLarge ¶ added in v1.2.8
func GetResponseTooLargeBodyFile ¶ added in v1.2.8
func GetResponseTooLargeHeaderFile ¶ added in v1.2.8
func GetResponseTooLargeSize ¶ added in v1.2.8
func GetResponseTraceInfo ¶
func GetResponseViewedByUser ¶ added in v1.2.6
func IsFiltered ¶ added in v1.2.8
IsFiltered returns true if the request is filtered out filtered request/response will not be logged into database
func IsResponseFiltered ¶ added in v1.2.8
func SetBareRequestBytes ¶ added in v1.2.6
func SetBareResponseBytes ¶ added in v1.2.6
func SetBareResponseBytesForce ¶ added in v1.2.9
func SetFlowTags ¶ added in v1.3.0
func SetHijackedRequestBytes ¶ added in v1.2.6
func SetHijackedResponseBytes ¶ added in v1.2.6
func SetMITMFrontendReadWriter ¶ added in v1.2.8
func SetMITMFrontendReadWriter(r *http.Request, rw io.ReadWriter)
SetMITMFrontendReadWriter sets the mitm frontend read writer
func SetMITMSkipFrontendFeedback ¶ added in v1.2.8
SetMITMSkipFrontendFeedback means: the frontend should skip feedback
func SetMatchedRule ¶ added in v1.2.6
func SetMatchedRule(req *http.Request, rule []*ypb.MITMContentReplacer)
func SetPlainRequestBytes ¶ added in v1.2.6
func SetPlainResponseBytes ¶ added in v1.2.6
func SetRemoteAddr ¶ added in v1.2.6
func SetRequestHTTPS ¶
func SetRequestModified ¶ added in v1.2.6
func SetRequestReaderOffset ¶ added in v1.3.2
func SetRequestTooLarge ¶ added in v1.2.8
func SetRequestURL ¶ added in v1.2.6
func SetRequestViaCONNECT ¶ added in v1.2.7
func SetRequestViewedByUser ¶ added in v1.2.6
func SetResponseBodySize ¶ added in v1.2.8
func SetResponseContentTypeFiltered ¶ added in v1.2.8
func SetResponseFinishedCallback ¶ added in v1.2.8
func SetResponseFinishedCallback(req *http.Request, h ResponseFinishedCallbackType)
func SetResponseHeaderCallback ¶ added in v1.2.8
func SetResponseHeaderCallback(req *http.Request, callback ResponseHeaderCallbackType)
func SetResponseHeaderParsed ¶ added in v1.2.8
func SetResponseHeaderParsed(r *http.Request, cb ResponseHeaderParsedCallback)
func SetResponseHeaderWriter ¶ added in v1.2.8
func SetResponseMaxContentLength ¶ added in v1.2.8
func SetResponseModified ¶ added in v1.2.6
func SetResponseTimestamp ¶ added in v1.3.2
func SetResponseTooLarge ¶ added in v1.2.8
func SetResponseTooLargeBodyFile ¶ added in v1.2.8
func SetResponseTooLargeHeaderFile ¶ added in v1.2.8
func SetResponseTooLargeSize ¶ added in v1.2.8
func SetResponseTraceInfo ¶
func SetResponseViewedByUser ¶ added in v1.2.6
Types ¶
type ResponseFinishedCallbackType ¶ added in v1.2.8
type ResponseFinishedCallbackType func()
func GetResponseFinishedCallback ¶ added in v1.2.8
func GetResponseFinishedCallback(r *http.Request) ResponseFinishedCallbackType
type ResponseHeaderCallbackType ¶ added in v1.2.8
type ResponseHeaderCallbackType func(response *http.Response, headerBytes []byte, bodyReader io.Reader) (io.Reader, error)
func GetResponseHeaderCallback ¶ added in v1.2.8
func GetResponseHeaderCallback(req *http.Request) ResponseHeaderCallbackType
type ResponseHeaderParsedCallback ¶ added in v1.2.8
ResponseHeaderParsedCallback defines how response header is parsed for handling
func GetResponseHeaderParsed ¶ added in v1.2.8
func GetResponseHeaderParsed(r *http.Request) ResponseHeaderParsedCallback
Click to show internal directories.
Click to hide internal directories.