- uses event buffering to support application latency in proxied requests
- uses event buffering to support application latency in proxied requests
- minimal request overhead and latency
- minimal request overhead and latency
- fully-tested
- fully-tested
...
@@ -14,26 +15,26 @@
...
@@ -14,26 +15,26 @@
- written entirely in javascript
- written entirely in javascript
- easy to use api
- easy to use api
### Todo
- add ability to black list ip addresses
### When to use node-http-proxy
### When to use node-http-proxy
Let's suppose you were running multiple http application servers, but you only wanted to expose one machine to the internet. You could setup node-http-proxy on that one machine and then reverse-proxy the incoming http requests to locally running services which were not exposed to the outside network.
Let's suppose you were running multiple http application servers, but you only wanted to expose one machine to the internet. You could setup node-http-proxy on that one machine and then reverse-proxy the incoming http requests to locally running services which were not exposed to the outside network.
### Installing npm (node package manager)
curl http://npmjs.org/install.sh | sh
### Installing node-http-proxy
### Installing node-http-proxy
npm install http-proxy
npm install http-proxy
### How to use node-http-proxy
#### proxying requests using http.Server
var httpProxy = require('./lib/node-http-proxy').httpProxy;
http.createServer(function (req, res){
http.createServer(function (req, res){
var proxy = new httpProxy;
var proxy = new httpProxy;
...
@@ -51,4 +52,20 @@ Let's suppose you were running multiple http application servers, but you only w
...
@@ -51,4 +52,20 @@ Let's suppose you were running multiple http application servers, but you only w
see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js) for further examples.
see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js) for further examples.
### Why doesn't node-http-proxy have more advanced features like x, y, or z?
### Why doesn't node-http-proxy have more advanced features like x, y, or z?
if you have a suggestion for a feature currently not supported, feel free to open a [support issue](https://github.com/nodejitsu/node-http-proxy/issues). node-http-proxy is designed to just proxy https request from one server to another, but we will be soon releasing many other complimentary projects that can be used in conjunction with node-http-proxy
if you have a suggestion for a feature currently not supported, feel free to open a [support issue](http://github.com/nodejitsu/node-http-proxy/issues). node-http-proxy is designed to just proxy http request from one server to another, but we will be soon releasing many other complimentary projects that can be used in conjunction with node-http-proxy
\ No newline at end of file
### Todo
- add ability to black list ip addresses
### License
(The MIT License)
Copyright (c) 2010 Charlie Robbins & Marak Squires
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.