Documentation ¶
Overview ¶
Package proxy provide NaughtyProxy as a HTTP reverse proxy that can connects to both http/https backend server. It uses hooked print function to print http(s) request/response. It also provides a call back function that provide a method modifying the original request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NaughtyProxy ¶
type NaughtyProxy struct { // ReverseProxy is inherited for using it's functions such as // Director and Transport *httputil.ReverseProxy // Backend is the backend server parsed in URL format Backend *url.URL // Speaker is a Render interface for printing http request/response Speaker speakhttp.Render // Callback is a function to modify outgoing http request // You can process the outgoing request based on incoming one Callback func(inReq, outReq *http.Request) }
NaughtyProxy is a reverse proxy server that acting as man-in-the-middle and printing http request/response for debugging purposes
func (*NaughtyProxy) ServeHTTP ¶
func (p *NaughtyProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP is the HTTP handler function.
Click to show internal directories.
Click to hide internal directories.