mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-19 13:38:27 +00:00
update version
This commit is contained in:
commit
afadcec81a
@ -274,6 +274,7 @@ function connectReqHandler(req, socket, head){
|
||||
|
||||
//find port
|
||||
function(callback){
|
||||
|
||||
if(shouldIntercept){
|
||||
//TODO : remote port other than 433
|
||||
httpsServerMgrInstance.fetchPort(host,userRequestHandler,function(err,port){
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "anyproxy",
|
||||
"version": "2.8.7",
|
||||
"version": "2.8.8",
|
||||
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
|
||||
"main": "proxy.js",
|
||||
"bin": {
|
||||
@ -33,7 +33,8 @@
|
||||
"socks5-http-client": "^0.1.6",
|
||||
"socks5-https-client": "^0.2.2",
|
||||
"http-proxy-agent":"^0.2.6",
|
||||
"https-proxy-agent":"^0.3.5"
|
||||
"https-proxy-agent":"^0.3.5",
|
||||
"tcp-ping":"^0.1.1"
|
||||
},
|
||||
"repository": {
|
||||
"type":"git",
|
||||
|
17
proxy.js
17
proxy.js
@ -10,10 +10,10 @@ try{
|
||||
GLOBAL.util['mysql'] = require('mysql');
|
||||
GLOBAL.util['Socks5ClientHttpAgent'] = require('socks5-http-client/lib/Agent');
|
||||
GLOBAL.util['Socks5ClientHttpsAgent'] = require('socks5-https-client/lib/Agent');
|
||||
GLOBAL.util['HttpProxyAgent'] = require("http-proxy-agent");
|
||||
GLOBAL.util['HttpsProxyAgent'] = require("https-proxy-agent");
|
||||
|
||||
|
||||
GLOBAL.util['HttpProxyAgent'] = require('http-proxy-agent');
|
||||
GLOBAL.util['HttpsProxyAgent'] = require('https-proxy-agent');
|
||||
GLOBAL.util['tcp-ping'] = require('tcp-ping');
|
||||
GLOBAL.util['async'] = require('async');
|
||||
}catch(e){}
|
||||
|
||||
var http = require('http'),
|
||||
@ -150,8 +150,15 @@ function proxyServer(option){
|
||||
|
||||
//TODO : uncaught exception
|
||||
//kill web server when father process exits
|
||||
process.on("exit uncaughtException",function(){
|
||||
process.on("exit",function(code){
|
||||
child_webServer.kill();
|
||||
console.log('AnyProxy is about to exit with code:', code);
|
||||
process.exit();
|
||||
});
|
||||
|
||||
process.on("uncaughtException",function(err){
|
||||
child_webServer.kill();
|
||||
console.log('Caught exception: ' + err);
|
||||
process.exit();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user