// very-simple-proxy.js
var https = require('https');
https.createServer({key,cert},request).listen(8005);
console.log('listening 8005');
function request(req,res){
if(req.url=='/'){
res.writeHead(200,{'content-type':'text/html'});
res.end(html);
return;
}
var req2 = https.request('https://localhost:8006'+req.url,{ca:cert,method:req.method},res2=>{
res2.on('data',data=>res.write(data));