title: node.js http(s): get ip address of remote server
body: <p>When I'm doing https.request({ host: 'domain.com', ... }), how can I get the actual IP address I'm connecting to?</p>
  
  <p>Note that domain.com resolving to multiple IPs and I want to know exactly the IP I'm connecting to.</p>
  
  <p>I tried to get it from socket.remoteAddress:
  <code>req.on('socket', function(socket) { console.log(socket.remoteAddress) })</code>, but it's undefined.</p>