try to fix https connection issue

This commit is contained in:
加里 2014-09-11 14:55:47 +08:00
parent 45433d6e0c
commit 8cb2925dc3
6 changed files with 6 additions and 6 deletions

View File

@ -192,7 +192,7 @@ Using https features
#### step 2 - generate a rootCA and trust it #### step 2 - generate a rootCA and trust it
* you should do this when it is the first time to start anyproxy * you should do this when it is the first time to start anyproxy
* execute ``anyproxy --root`` ,follow the instructions on screen * execute ``sudo anyproxy --root`` ,follow the instructions on screen
* **[important!]you will see some tip like *rootCA generated at : /usr/lib...* . ``cd`` to that directory, add/trust the rootCA.crt file to your system keychain. In OSX, you may do that by open the *crt file directly** * **[important!]you will see some tip like *rootCA generated at : /usr/lib...* . ``cd`` to that directory, add/trust the rootCA.crt file to your system keychain. In OSX, you may do that by open the *crt file directly**
#### step 3 - start a https proxy #### step 3 - start a https proxy

View File

@ -77,7 +77,7 @@ function checkRootCA(){
function generateRootCA(){ function generateRootCA(){
if(isRootCAFileExists()){ if(isRootCAFileExists()){
console.log(color.yellow("rootCA exists at " + certDir)); console.log(color.yellow("rootCA exists at " + cmdDir));
var rl = readline.createInterface({ var rl = readline.createInterface({
input: process.stdin, input: process.stdin,
output: process.stdout output: process.stdout

View File

@ -268,6 +268,7 @@ function connectReqHandler(req, socket, head){
callback(); callback();
} }
//connect //connect
},function(callback){ },function(callback){
try{ try{

View File

@ -1,6 +1,6 @@
module.exports = { module.exports = {
summary:function(){ summary:function(){
return "the default rule for anyproxy, which supports CORS request"; return "the default rule for anyproxy, support : CORS / HTTPS(if root cert is ready)";
}, },
shouldUseLocalResponse : function(req,reqBody){ shouldUseLocalResponse : function(req,reqBody){
@ -42,7 +42,7 @@ module.exports = {
}, },
shouldInterceptHttpsReq :function(req){ shouldInterceptHttpsReq :function(req){
return true; return false;
} }
}; };

View File

@ -18,7 +18,6 @@ module.exports.merge = function(baseObj, extendObj){
return baseObj; return baseObj;
} }
module.exports.getUserHome = function(){ module.exports.getUserHome = function(){
return process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE; return process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "anyproxy", "name": "anyproxy",
"version": "2.3.4", "version": "2.3.5",
"description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.", "description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.",
"main": "proxy.js", "main": "proxy.js",
"bin": { "bin": {