Node.js 使用node js在nodejitsu中运行转发代理服务器

Node.js 使用node js在nodejitsu中运行转发代理服务器,node.js,proxy,nodejitsu,Node.js,Proxy,Nodejitsu,我是代理服务器新手。我想做的是:我想写一些node.js代码,然后上传到我的nodejitsu帐户,作为代理服务器运行。然后,我想在我的计算机上使用我的nodejitsu代理服务器,方法是将http代理配置为“abc.jit.su”(我的jitsu URL),并在Chrome、Firefox或IE中将端口配置为“80”。也就是说,我希望我的nodejitsu代理服务器具有与此处列出的代理相同的功能:。有什么想法吗 您可以使用模块编写一个简单的代理,如下所示: var http = require

我是代理服务器新手。我想做的是:我想写一些node.js代码,然后上传到我的nodejitsu帐户,作为代理服务器运行。然后,我想在我的计算机上使用我的nodejitsu代理服务器,方法是将http代理配置为“abc.jit.su”(我的jitsu URL),并在Chrome、Firefox或IE中将端口配置为“80”。也就是说,我希望我的nodejitsu代理服务器具有与此处列出的代理相同的功能:。有什么想法吗

您可以使用模块编写一个简单的代理,如下所示:

var http = require('http'),
    request = require('request');

// For nodejitsu, this will be port 80 externally
var port = process.env.PORT || 8000;

http.createServer(function(req,res) {
  req.pipe(request(req.url)).pipe(res)
}).listen(port);
但是,这只适用于http,而不适用于https

Nodejitsu还制作了一个,你可以通过看它来了解下一步要做什么