Open Issues

I want to rewrite request cookie using following code, but didn't work.
javascript
proxy.on('proxyReq', function (proxyReq, req, res) {
proxyReq.setHeader('cookie', 'SESSION=123');
});
And is there a way to find API of proxyReq Object?

I created a simple but shady gist https://gist.github.com/regevbr/de3f5e0475aedd9081608663241bee10 that solves the issue of using this project as a proxy chain.
I think it is worth mentioning this methodology in the readme and add an example. Maybe even add a built in support for this.

I run this example in my local (example:https://github.com/nodejitsu/node-http-proxy/blob/master/examples/http/proxy-https-to-https.js), It works. But when I set my phone's proxy with this code's proxy and port ,my phone can not visit the https website.

Hi,
I'm not sure why the http-proxy package is doing this, but, I created an HTTPproxy server, with an HTTPS agent, and I try to froward HTTP request into HTTPS destination. Everything works well, but,
when I listen to proxyRes events, and try to capture peer's certificate, I can only get the certificate in the first time. When I try to proxy a new HTTPS request (to the same destination), the proxyRes object no longer have a certificate, even if this is a new request (to the same remote https serveR).
NOTE: the reason I need the certificate is to check that the certificate domain is the same as the request domain (else, this is not valid certificate).
Is there a way to get the certificate after the first time? or to tell the http-proxy server not to cache anything...? Here is my code: