Skip to content

Commit

Permalink
setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
vitacoding committed Dec 3, 2012
1 parent 243e29d commit e36fec1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
22 changes: 22 additions & 0 deletions index.js
@@ -0,0 +1,22 @@
var http = require('http'),
url = require('url');

var proxyserver = http.createServer(function(clientreq,clientres){
var clienturl = url.parse(clientreq.url);
var proxyreqopts = {
host: clienturl.host,
hostname: clienturl.hostname,
port: clienturl.port?clienturl.port:80,
path: clienturl.path,
method: clientreq.method,
headers: clientreq.headers,
};
//console.log(proxyreqopts);
console.log(clientreq.headers);
http.request(proxyreqopts,function(proxyres){
clientres.end('fine,iproxy!');
});
});

proxyserver.listen(8088);

27 changes: 27 additions & 0 deletions package.json
@@ -0,0 +1,27 @@
{
"name": "iproxy",
"description": "this's my own proxy, I can decide any receiving when I surfing on the internet.",
"version": "0.0.1",
"author": {
"name": "Vendar Tyan",
"email": "eplaylity@gmail.com"
},
"repository": {
"type": "git",
"url": "git://github.com/zhiya/iproxy.git"
},
"main": "./index.js",
"dependencies": {
"express": "2.5.9",
"jade": "0.26.1"
},
"engines": {
"node": ">= 0.6.17"
},
"_id": "iproxy@0.0.1",
"optionalDependencies": {},
"_engineSupported": true,
"_npmVersion": "1.1.21",
"_nodeVersion": "v0.6.19",
"_defaultsLoaded": true,
}

0 comments on commit e36fec1

Please sign in to comment.