-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jean-Tiare Le Bigot
committed
Sep 16, 2011
1 parent
902dedd
commit 8eba601
Showing
3 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,47 @@ | ||
Nodejs-proxy is a simple HTTP proxy server written in node.js. It currently | ||
just proxies all the requests on port 8080. | ||
|
||
Nodejs-proxy was written by Peteris Krumins (peter@catonmat.net). | ||
His blog is at http://www.catonmat.net -- good coders code, great reuse. | ||
|
||
------------------------------------------------------------------------------ | ||
|
||
You'll need node.js to run it. Get it at www.nodejs.org, then compile and | ||
install it: | ||
|
||
$ ./configure | ||
$ make | ||
$ make install | ||
|
||
Next, run proxy.js through node program: | ||
|
||
$ node proxy.js | ||
|
||
And that's it! | ||
|
||
I have also added ip-based access control and by default the proxy will | ||
deny all IPs. To add a new ip, just echo it to 'allow_ip_list' file: | ||
|
||
$ echo '1.2.3.4' >> config/allow_ip_list | ||
|
||
And you don't need to restart the server, it will see the changes and update | ||
itself. | ||
|
||
You can also block hosts based on a regex pattern, to do that, echo the hosts | ||
you don't wish the proxy to serve to 'black_list' file: | ||
|
||
$ echo 'facebook.com' >> config/black_list | ||
|
||
|
||
More features coming later! | ||
|
||
|
||
------------------------------------------------------------------------------ | ||
|
||
Happy proxying! | ||
|
||
Sincerely, | ||
Peteris Krumins | ||
http://www.catonmat.net | ||
|
||
Nodejs-proxy is a simple HTTP reverse proxy server written in node.js. It currently | ||
allows some mid-complexity to handle the reverse proxy magic take place. | ||
|
||
Nodejs-proxy was written by Peteris Krumins (peter@catonmat.net). | ||
His blog is at http://www.catonmat.net -- good coders code, great reuse. | ||
|
||
------------------------------------------------------------------------------ | ||
|
||
You'll need node.js to run it. Get it at www.nodejs.org, then compile and | ||
install it: | ||
|
||
$ ./configure | ||
$ make | ||
$ make install | ||
|
||
Next, run proxy.js through node program: | ||
|
||
$ node proxy.js | ||
|
||
And that's it! | ||
|
||
I have also added ip-based access control. As long as no ip is explicitly denied, | ||
all will be allowed. If you need a specic access list just echo it to | ||
'allow_ip_list' file: | ||
|
||
$ echo '1.2.3.4' >> config/allow_ip_list | ||
|
||
And you don't need to restart the server, it will see the changes and update | ||
itself. | ||
|
||
You can also block hosts based on a regex pattern, to do that, echo the hosts | ||
you don't wish the proxy to serve to 'black_list' file: | ||
|
||
$ echo 'facebook.com' >> config/black_list | ||
|
||
|
||
More features coming later! | ||
|
||
|
||
------------------------------------------------------------------------------ | ||
|
||
Happy proxying! | ||
|
||
Sincerely, | ||
Peteris Krumins | ||
http://www.catonmat.net | ||
|