goproxy
goproxy copied to clipboard
An HTTP proxy library for Go
Has anyone been able to deploy this as a lambda on AWS or any other similar service?
I will execute Proxy.OnResponse().DoFunc many times. type ProxyHttpServer struct { respHandlers []RespHandler } so,I hope clear respHandlers chain please add method for ProxyHttpServer to clear respHandlers add method like this:...
This PR unifies HTTP and HTTPS error handling and makes it customizable by adding `Proxy.HTTPErrorHandler`. - HTTP code is moved to http.go file - HTTP code calls httpError if response...
Excuse me, how to print client IP addrs on my server? func main() { flag.Usage = func() { flag.PrintDefaults() } flag.Parse() if serverPort == "" { log.Fatalln("Error: please setting correct...
Without this patch IsLocalHost does not work for URLs with port specified i.e. it works for `http://localhost` but does not work for `http://localhost:80` or `http://localhost:10000`. Fixes #487
It was originally observed in https://github.com/elazarl/goproxy/issues/289. The `IsLocalHost` function uses `req.URL.Host` https://github.com/elazarl/goproxy/blob/a0805db90819b464f8fadc660e23a6a6b9d4942f/dispatcher.go#L105 It can be [host or host:port](https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/net/url/url.go;l=363). In the latter case the check simply does not work. It's not...
func AlwaysMitm is a function deal with https, what's the http one?
In my use case, I start the proxy on `127.0.0.1:8080` and issue the following command: `curl --proxy "127.0.0.1:8080" -H "Host: domain.com" "http://130.130.10.10/ping"` I expect that the origin server `130.130.10.10` would...
I have been unable to use `.handleConnect`, to hijack the CONNECT requests, and also `.DoFunc` to be able to access and modify request data. When using `.handleConnect`, my `.DoFunc` function...