Yes it is possible.
Recently I created a http_proxy server in Java which start 3 socket servers:
- Http server to receive user request, and
- WebSocket server to allow Chromium extension to create connection to the http_proxy server.
- Http Server to receive response body from Chromium.
So, there will be 3 socket connections:
- To receive http user request and send back the content, and
- To send the URL requested to Chromium browser
- When response received by browser (via Xhr), it will do HTTP POST to http_proxy server to send the content.
That's all!