title: Create proxy server Socket hang up (HTTPS)
body: <p>Hi I'm using meteor and http-proxy from node js. I got this error sometimes </p>
  
  <pre><code>W20160526-08:53:02.348(7)? (STDERR) 
  W20160526-08:53:02.350(7)? (STDERR) /usr/local/bin/here_test/node_modules/http-proxy/lib/http-proxy/index.js:119
  W20160526-08:53:02.350(7)? (STDERR)     throw err;
  W20160526-08:53:02.426(7)? (STDERR)           ^
  W20160526-08:53:02.429(7)? (STDERR) Error: socket hang up
  W20160526-08:53:02.429(7)? (STDERR)     at createHangUpError (http.js:1528:15)
  W20160526-08:53:02.430(7)? (STDERR)     at Socket.socketCloseListener (http.js:1578:23)
  W20160526-08:53:02.430(7)? (STDERR)     at Socket.emit (events.js:95:17)
  W20160526-08:53:02.430(7)? (STDERR)     at TCP.close (net.js:466:12)
  </code></pre>
  
  <p>Since I don't get any answers from this <a href="https://stackoverflow.com/questions/37052874/node-js-proxy-server-socket-hang-up">post</a>, so I ask in my own post. 
  this is my proxy code </p>
  
  <pre><code>var PATH_TO_KEY = "/usr/local/bin/here_test/here.enseval.com.key",  
      PATH_TO_CERT = "/usr/local/bin/here_test/star_enseval_com(3).pem";
      //PATH_TO_CHAIN = "";
  
  var fs = require('fs'),  
      httpProxy = require('http-proxy');
  
  var options = {  
    ssl: {    
      key: fs.readFileSync(PATH_TO_KEY, 'utf8'),
      cert: fs.readFileSync(PATH_TO_CERT, 'utf8')
      //ca : fs.readFileSync(PATH_TO_CHAIN, 'utf8')
    },
    target : "http://here.enseval.com",
    secure:true,
    ws:true,
    xfwd: true 
  };
  
  var server = httpProxy.createProxyServer(options).listen(443);
  </code></pre>
  
  <p>I already use <code>ws:true</code> according to this <a href="http://zacharywolffs.ghost.io/2015/01/08/setting-up-node-js-https-proxy/" rel="nofollow noreferrer">website</a> but still I got that randomly errors.</p>
  
  <p>Anyone can help me? </p>
  
  <p>thank you</p>