我正在尝试实现最简单的示例:
var http = require('http'),
var httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
//
// I would add logging here
//
proxy.proxyRequest(req, res, { host: 'www.google.com', port: 80 });
}).listen(18000);
当我将浏览器配置为使用此代理并导航到 www.google.com 时,我没有收到任何响应。我做错了什么?
我正在使用 Windows 7 Chrome