Did you provide the proxy options to the http connection?
The below should help.
var http = require("http");
var options = {
hostname: "<proxy-server-address>",
port: <proxy-server-port>,
path: "http://www.xyz.com",
headers: {
Host: "www.xyz.com"
}
};
var req = http.request(options, function(res){ ... });
req.end();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…