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 GetHijackedRequestBytes(r *http.Request) []byte
- func GetHijackedResponseBytes(r *http.Request) []byte
- 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 GetRequestURL(req *http.Request) string
- func GetRequestViaCONNECT(req *http.Request) bool
- func GetRequestViewedByUser(req *http.Request) bool
- func GetResponseIsModified(req *http.Request) bool
- func GetResponseViewedByUser(req *http.Request) bool
- func SetBareRequestBytes(r *http.Request, bytes []byte)
- func SetBareResponseBytes(r *http.Request, bytes []byte)
- func SetContextValueInfoFromRequest(r *http.Request, key string, value any)
- func SetHijackedRequestBytes(r *http.Request, bytes []byte)
- func SetHijackedResponseBytes(r *http.Request, bytes []byte)
- 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 SetRequestURL(req *http.Request, urlStr string)
- func SetRequestViaCONNECT(req *http.Request, b bool)
- func SetRequestViewedByUser(req *http.Request)
- func SetResponseModified(req *http.Request, by ...string)
- func SetResponseViewedByUser(req *http.Request)
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_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" // matched mitm rules 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 GetHijackedRequestBytes ¶ added in v1.2.6
func GetHijackedResponseBytes ¶ added in v1.2.6
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 GetRequestURL ¶ added in v1.2.6
func GetRequestViaCONNECT ¶ added in v1.2.7
func GetRequestViewedByUser ¶ added in v1.2.6
func GetResponseIsModified ¶ added in v1.2.6
func GetResponseViewedByUser ¶ added in v1.2.6
func SetBareRequestBytes ¶ added in v1.2.6
func SetBareResponseBytes ¶ added in v1.2.6
func SetHijackedRequestBytes ¶ added in v1.2.6
func SetHijackedResponseBytes ¶ added in v1.2.6
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 SetRequestURL ¶ added in v1.2.6
func SetRequestViaCONNECT ¶ added in v1.2.7
func SetRequestViewedByUser ¶ added in v1.2.6
func SetResponseModified ¶ added in v1.2.6
func SetResponseViewedByUser ¶ added in v1.2.6
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.