--
You received this message because you are subscribed to the Google Groups "goproxy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to goproxy-dev+unsubscribe@googlegroups.com.
To post to this group, send email to gopro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/goproxy-dev/54A56A3C.6020609%40mezard.eu.
For more options, visit https://groups.google.com/d/optout.
On Thu Jan 01 2015 at 5:39:43 PM Patrick Mézard <pat...@mezard.eu> wrote:Hello,
What I am missing is:
1- Why the need for NonproxyHandler? It seems to be used for request with relative URLs. Why have these to be handled separately?
By default, a goproxy proxy behaves like a regular proxy. That is, it'll ignore non-proxy requests sent directly to it.This is a good default, but in case you want to handle direct request otherwise - you have the NonproxyHandler.
2- What is the use for HijackConnect machinery defined in:
https://github.com/elazarl/goproxy/blob/master/examples/transparent/transparent.go#L47
It seems to directly forward CONNECT requests made on :80, bypassing the request/response handlers. Is that correct?
IIRC this is for requests done with "curl -p -x proxy:8080", that is, regular HTTP requests, done by issuing a CONNECT to the proxy.
3- Is the ReqHostMatches() in:
https://github.com/elazarl/goproxy/blob/master/examples/transparent/transparent.go#L45
really necessary?
No it isn't. This is just a convenient function. In retrospect, I would've put all these convenient functions in a separate, less stable package.Alas, I don't want to break backwards compatibility for this now.I already thought to beautify the API with goproxy v2 (e.g., goproxy.New() instead of the NewHTTPProxy), but I'm not sure it's worth the trouble.Thanks for using goproxy,Sorry for the time it took me to response. If you have any other questions - do not hesitate to ask.
Thanks!
Feedback is much a appreciated.
Certificate generation is not cached, and might be the culprit.
You can override it though.
I'll be happy to see a pull request to clarify the example if you have time.
Problems in https are important. I'll be happy to here more about it as well.
Thanks!