Open JoeyVinc opened 4 weeks ago
Px is a proxy so it expects curl --proxy http://192.168.178.23:3128
style of usage. The Host header is for virtual hosting, not forwarding. Can you please explain why you expect this to work?
I used CURL just to make the issue visible. In fact I use nginx as a proxy/router in my docker configuration. At the moment I use the stream-support of nginx to route proxy requests to another local running "px" instance (which does re-route the request to another company proxy).
client --> nginx --> px --> company proxy
Due to the fact, that the stream func of nginx cannot "manipulate" HTTP requests (e.g. add header data or route a URL-X to a URL-B) the idea is, to use instead of a stream a normal HTTP request (with Proxy-headers).
An there we are: HTTP GET requests in NGINX always begins with a "\" --> nginx itself try to send this request to the local PX instance. Therefore we get an empty (or only a backslash) GET request. This is what I replayed with CURL.
I won't claim to really understand the setup above. Is this something that is supported by HTTP or by proxies in general? Any documentation to that order will help proceed on a generic way to solve this.
When PX gets an GET-header which is not set (or "/") although the HOST header is set, PX throws an exception. Expected behavior: if an HOST header is set accept it as target address.
Example:
PX runs on local machine (192....:3128); requested host is example.com
Log:
Debug-Log of PX: