1
0
mirror of https://github.com/alibaba/anyproxy.git synced 2025-05-10 14:58:27 +00:00

use custom port for test.js

This commit is contained in:
加里 2014-11-17 11:02:24 +08:00
parent 4e65353a29
commit a7ef1b2215
3 changed files with 4 additions and 3 deletions

@ -302,6 +302,7 @@ function connectReqHandler(req, socket, head){
socket.write('HTTP/' + req.httpVersion + ' 200 OK\r\n\r\n', 'UTF-8', function() {
conn.pipe(socket);
socket.pipe(conn);
callback();
});
});

@ -149,7 +149,6 @@ function proxyServer(option){
}
});
//TODO : uncaught exception
//kill web server when father process exits
process.on("exit",function(code){
child_webServer.kill();

@ -2,11 +2,12 @@ var tester = require("proxy-eval"),
proxy = require("./proxy.js");
new proxy.proxyServer({
type:"http"
type:"http",
port:8995
});
setTimeout(function(){
tester.test( {proxy : 'http://127.0.0.1:8001',reqTimeout:3000} ,function(results){
tester.test( {proxy : 'http://127.0.0.1:8995',reqTimeout:3000} ,function(results){
tester.printResult(results);
process.exit();
});