Created
April 22, 2012 21:22
-
-
Save moderation/2467004 to your computer and use it in GitHub Desktop.
SPDY proxy
This file contains hidden or 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 fs = require('fs'), | |
spdy = require('spdy'), | |
httpProxy = require('http-proxy'); | |
var options = { | |
key: fs.readFileSync(__dirname + '/moderation-key.pem'), | |
cert: fs.readFileSync(__dirname + '/moderation-cert.pem'), | |
ca: fs.readFileSync(__dirname + '/moderation-csr.pem') | |
}; | |
var proxy = new httpProxy.RoutingProxy(); | |
spdy.createServer(options, function(req, res) { | |
proxy.proxyRequest(req, res, { | |
host: 'localhost', | |
port: 8080 | |
}); | |
}).listen(10443); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment