Skip to content

Commit 85f7372

Browse files
committed
initial release v0.1.0, sure to have many updates coming.
1 parent 17b6c69 commit 85f7372

File tree

4 files changed

+93
-29
lines changed

4 files changed

+93
-29
lines changed

README.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,23 @@ if you have a suggestion for a feature currently not supported, feel free to ope
5959

6060
(The MIT License)
6161

62-
Copyright (c) 2010 Charlie Robbins & Marak Squires
63-
64-
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:
65-
66-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
67-
68-
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.
62+
Copyright (c) 2010 Charlie Robbins & Marak Squires http://github.com/nodejitsu/
63+
64+
Permission is hereby granted, free of charge, to any person obtaining
65+
a copy of this software and associated documentation files (the
66+
"Software"), to deal in the Software without restriction, including
67+
without limitation the rights to use, copy, modify, merge, publish,
68+
distribute, sublicense, and/or sell copies of the Software, and to
69+
permit persons to whom the Software is furnished to do so, subject to
70+
the following conditions:
71+
72+
The above copyright notice and this permission notice shall be
73+
included in all copies or substantial portions of the Software.
74+
75+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
76+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
77+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
78+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
79+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
80+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
81+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

demo.js

+25-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
/*
2-
* node-proxy-test.js: Tests for node-proxy. Reverse proxy for node.js
3-
*
4-
* (C) 2010 Charlie Robbins, Marak Squires
5-
* MIT LICENSE
6-
*
7-
*/
8-
2+
demo.js: http proxy for node.js
3+
4+
Copyright (c) 2010 Charlie Robbins & Marak Squires http://github.com/nodejitsu/node-http-proxy
5+
6+
Permission is hereby granted, free of charge, to any person obtaining
7+
a copy of this software and associated documentation files (the
8+
"Software"), to deal in the Software without restriction, including
9+
without limitation the rights to use, copy, modify, merge, publish,
10+
distribute, sublicense, and/or sell copies of the Software, and to
11+
permit persons to whom the Software is furnished to do so, subject to
12+
the following conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
25+
*/
26+
927
var sys = require('sys'),
1028
colors = require('colors')
1129
http = require('http'),
@@ -22,13 +40,10 @@ var welcome = '\
2240
# # # # # # # # #### # # # \n';
2341
sys.puts(welcome.rainbow.bold);
2442

25-
26-
2743
// create regular http proxy server
2844
http.createServer(function (req, res){
2945
var proxy = new httpProxy;
3046
proxy.init(req, res);
31-
sys.puts('proxying request to http://localhost:9000');
3247
proxy.proxyRequest('localhost', '9000', req, res);
3348
}).listen(8000);
3449
sys.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow);

lib/node-http-proxy.js

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
/*
2-
* node-http-proxy.js: Reverse proxy for node.js
3-
*
4-
* (C) 2010 Charlie Robbins
5-
* MIT LICENSE
6-
*
7-
*/
2+
node-http-proxy.js: http proxy for node.js
3+
4+
Copyright (c) 2010 Charlie Robbins & Marak Squires http://github.com/nodejitsu/node-http-proxy
5+
6+
Permission is hereby granted, free of charge, to any person obtaining
7+
a copy of this software and associated documentation files (the
8+
"Software"), to deal in the Software without restriction, including
9+
without limitation the rights to use, copy, modify, merge, publish,
10+
distribute, sublicense, and/or sell copies of the Software, and to
11+
permit persons to whom the Software is furnished to do so, subject to
12+
the following conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
25+
*/
826

927
var sys = require('sys'),
1028
http = require('http'),

test/node-http-proxy-test.js

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
/*
2-
* node-http-proxy-test.js: Tests for node-http-proxy. Reverse proxy for node.js
3-
*
4-
* (C) 2010 Charlie Robbins
5-
* MIT LICENSE
6-
*
7-
*/
2+
node-http-proxy.js: http proxy for node.js
3+
4+
Copyright (c) 2010 Charlie Robbins & Marak Squires http://github.com/nodejitsu/node-http-proxy
5+
6+
Permission is hereby granted, free of charge, to any person obtaining
7+
a copy of this software and associated documentation files (the
8+
"Software"), to deal in the Software without restriction, including
9+
without limitation the rights to use, copy, modify, merge, publish,
10+
distribute, sublicense, and/or sell copies of the Software, and to
11+
permit persons to whom the Software is furnished to do so, subject to
12+
the following conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
25+
*/
826

927
var vows = require('vows'),
1028
sys = require('sys'),

0 commit comments

Comments
 (0)