You're replying to a comment by Elmer Bulthuis.

Elmer Bulthuis Permalink
September 25, 2012, 15:54

i proxy like this:

function serveProxy(host, port, url, req, res){
	var proxy = http.createClient(port, host);
	var proxy_req = proxy.request(req.method, url, req.headers);
	proxy_req.addListener('response', function (proxy_res) {
		res.writeHead(proxy_res.statusCode, proxy_res.headers);
		proxy_res.pipe(res);
	});
	req.pipe(proxy_req);
}

a little shorter!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "halflife3_215": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.