mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-24 06:21:26 +00:00
print a hint when using SNI features in node <0.12
This commit is contained in:
parent
200226807c
commit
3e679f0834
@ -1,3 +1,8 @@
|
||||
18 June: anyproxy 3.5.1:
|
||||
|
||||
* print a hint when using SNI features in node <0.12
|
||||
* Ref : https://github.com/alibaba/anyproxy/issues/25
|
||||
|
||||
18 June: anyproxy 3.5.0:
|
||||
|
||||
* it's a formal release of 3.4.0@beta.
|
||||
|
@ -48,7 +48,7 @@ function SNIPrepareCert(serverName,SNICallback){
|
||||
SNICallback(null,ctx);
|
||||
}else{
|
||||
logUtil.printLog("err occurred when prepare certs for SNI - " + err, logUtil.T_ERR);
|
||||
logUtil.printLog("you may upgrade your Node.js to the lastest version", logUtil.T_ERR);
|
||||
logUtil.printLog("you may upgrade your Node.js to >= v0.12", logUtil.T_ERR);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ function printLog(content,type){
|
||||
if(!ifPrint) return;
|
||||
|
||||
var tip = content;
|
||||
|
||||
console.log(tip);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "anyproxy",
|
||||
"version": "3.5.0",
|
||||
"version": "3.5.1",
|
||||
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
|
||||
"main": "proxy.js",
|
||||
"bin": {
|
||||
|
6
proxy.js
6
proxy.js
@ -93,6 +93,12 @@ function proxyServer(option){
|
||||
|
||||
if(!!option.interceptHttps){
|
||||
default_rule.setInterceptFlag(true);
|
||||
|
||||
//print a tip when using https features in Node < v0.12
|
||||
var nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
||||
if(nodeVersion < 0.12){
|
||||
logUtil.printLog(color.red("node >= v0.12 is required when trying to intercept HTTPS requests :("), logUtil.T_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
if(option.throttle){
|
||||
|
Loading…
x
Reference in New Issue
Block a user