Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed Jul 28, 2010
1 parent 6e651f4 commit 341bbd4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
# node-http-proxy - v0.1.0

<img src = "http://i.imgur.com/dSSUX.png"/>

## Battle-hardened node.js http reverse proxy

### Features

- reverse-proxies incoming http.Server requests
- can be used as a CommonJS module in node.js
- can handled malformed http requests
- uses event buffering to support application latency in proxied requests
- minimal request overhead and latency
- fully-tested
- battled-hardened through production usage @ nodejitsu.com
- written entirely in javascript
- easy to use api

### Todo
- add ability to black list ip addresses

### 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.


### Installing npm (node package manager)

curl http://npmjs.org/install.sh | sh

### Installing node-http-proxy

npm install http-proxy

### How to use node-http-proxy

#### &nbsp;&nbsp;&nbsp;proxying requests using http.Server
### How to use node-http-proxy

var sys = require('sys'),
colors = require('colors')
http = require('http');

var httpProxy = require('./lib/node-http-proxy').httpProxy;
http = require('http'),
httpProxy = require('./lib/node-http-proxy').httpProxy;

http.createServer(function (req, res){
var proxy = new httpProxy;
Expand All @@ -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.
### 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

### 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.
5 changes: 2 additions & 3 deletions demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

var sys = require('sys'),
colors = require('colors')
http = require('http');

var httpProxy = require('./lib/node-http-proxy').httpProxy;
http = require('http'),
httpProxy = require('./lib/node-http-proxy').httpProxy;


// ascii art from http://github.com/marak/asciimo
Expand Down

0 comments on commit 341bbd4

Please sign in to comment.