nodejitsu/node-http-proxy — pull request #254 by silvinci (2012-05-29 14:46:35+00:00)
Title: Added unix socket support to node-http-proxy

http-proxy finally supports unix socket paths. This closes [this issue](https://github.com/nodejitsu/node-http-proxy/issues/104). You can now do stuff like this:
```javascript
var httpProxy = require("http-proxy");

var options = {
hostnameOnly: true,
router: {
"mywebsite.com": "/tmp/node-http/mywebsite"
}
};

var proxyServer = httpProxy.createServer(options).listen(80);
```
I mainly altered the ProxyTabel.getProxyLocation function. Before it tries to split the given target string into `host` and `port` it now looks for a leading slash which determines a `socketPath`.

This commit is tested on normal routing like shown above. I haven't tested it on direct `target`s and `WebSockets` but it should work.