Thanks Cosmin.
What you posted is more or less like a workaround for I am looking for. I am looking for "Explicit intermediary" for security reasons, and the only project I could find so far is
tcpmon[1]: Client(i.e. browser in my case) has to point to the intermediary rather than the original endpoint.
For example, the usage pattern I am looking for is:
1. Let's say a proxy tool runs at port 8080
2. The web application runs at a different port, say 8000
3. Proxy tool can be told about the web application port, and be configured to listen on it
4. Browser does not need to be edited for proxy server setting. Instead browser address bar is pointing to proxy tool's port (8080), not server port (8000)
I do not know if there is a terminology to coin what I am looking for. Maybe this can be called "explicit proxy" vs. "Transparent interception". In "explicit proxy", client is very aware of the proxy server (browser address bar is pointing to proxy tool port). In "Transparent interception", browser address bar is still pointing to server (the web application running port), and not aware that a proxy server is intercepting.
The main advantage for "explicit proxy" is security. However it seems that it is hardly adopted in any proxy tools in the industry? Anything I missed?
Thanks,
Jing
[1]
http://ws.apache.org/tcpmon/tcpmontutorial.html#HTTP_Proxy_support