 <p>I have created a http/https proxy with the aid of the <a href="https://npmjs.org/package/http-proxy" rel="nofollow">http-proxy</a> module: <a href="https://gist.github.com/ncthis/6863947" rel="nofollow">https://gist.github.com/ncthis/6863947</a></p> <p>Code as of now:</p> <pre><code>var fs = require('fs'), http = require('http'), https = require('https'), httpProxy = require('http-proxy'); var isHttps = true; // do you want a https proxy? var options = { https: { key: fs.readFileSync('key.pem'), cert: fs.readFileSync('key-cert.pem') } }; // this is the target server var proxy = new httpProxy.HttpProxy({ target: { host: '127.0.0.1', port: 8080 } }); if (isHttps) https.createServer(options.https, function(req, res) { console.log('Proxying https request at %s', new Date()); proxy.proxyRequest(req, res); }).listen(443, function(err) { if (err) console.log('Error serving https proxy request: %s', req); console.log('Created https proxy. Forwarding requests from %s to %s:%s', '443', proxy.target.host, proxy.target.port); }); else http.createServer(options.https, function(req, res) { console.log('Proxying http request at %s', new Date()); console.log(req); proxy.proxyRequest(req, res); }).listen(80, function(err) { if (err) console.log('Error serving http proxy request: %s', req); console.log('Created http proxy. Forwarding requests from %s to %s:%s', '80', proxy.target.host, proxy.target.port); }); </code></pre>