My understanding is that nginx cannot be used as a forward proxy out of
box. Is this correct?
If so, my thinking is that by making some small modifications to
ngx_http_proxy_module.c, it would be possible to have a nginx.conf file
“proxy_pass asdf”, where asdf ends up being ignored with the new
edits to ngx_http_proxy_module.c. Instead of doing the complex lookups
figure out the backend server, it would simply pull out the “Host” from
browser/client request being made, and use that as the appropriate URL
Would this work?
(As a background, I currently have a squid + ICAP setup in transparent
mode, and it works fine for proof-of-concept, but falls over in terms of
performance. As a result, I’m trying to use nginx as a replacement. And
the http_sub module, I’m thinking I don’t even need ICAP, since we only
a small snippet after the HTML head section of every web page.)
If there are better / easier ways of getting nginx to work as a forward
proxy, please let me know, and I’d be happy to contribute the edits
PS. If the response is in Russian, that’s cool too. I can read it just
(and speak it), but my writing is rather poor.