Skip to content

Instantly share code, notes, and snippets.

@djpimp2010
Created March 11, 2014 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djpimp2010/9adf444bab6839bba34b to your computer and use it in GitHub Desktop.
Save djpimp2010/9adf444bab6839bba34b to your computer and use it in GitHub Desktop.
With custom target ?
var certs = {
'domain1.com': getCredentialsContext('domain1.com')
};
var options = {
ssl: {
SNICallback: function(hostname){
return certs[hostname];
},
key: fs.readFileSync('/etc/certs/default.key'),
cert: fs.readFileSync('/etc/certs/default.crt'),
},
hostnameOnly: true,
target: function(hostname){
return ips[hostname];
},
secure: false,
}
var server = httpProxy.createServer(options);
server.listen(444);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment