-
-
Save djpimp2010/9adf444bab6839bba34b to your computer and use it in GitHub Desktop.
With custom target ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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