diff --git a/cert/gen-cer b/cert/gen-cer index 6ac5d34..3ab4ce1 100755 --- a/cert/gen-cer +++ b/cert/gen-cer @@ -43,6 +43,6 @@ openssl req -new -key $outputPath$domain.key -out $outputPath$domain.csr -passin #Generating a Self-Signed Certificate openssl x509 -req -days 365 -in $outputPath$domain.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out $outputPath$domain.crt -#-signkey $outputPath$domain.key +# -signkey $outputPath$domain.key #openssl x509 -req -in host.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out host.crt -days 365 echo "Finished" diff --git a/lib/certMgr.js b/lib/certMgr.js index 6142961..bef9bb0 100644 --- a/lib/certMgr.js +++ b/lib/certMgr.js @@ -39,7 +39,6 @@ function getCertificate(hostname,cb){ } function createCert(hostname,callback){ - console.log(hostname); checkRootCA(); var cmd = "./gen-cer __host __path".replace(/__host/,hostname).replace(/__path/,certDir); diff --git a/lib/rule_default.js b/lib/rule_default.js index f1279d5..17a2c49 100644 --- a/lib/rule_default.js +++ b/lib/rule_default.js @@ -4,7 +4,6 @@ module.exports = { }, shouldUseLocalResponse : function(req,reqBody){ - //intercept all options request if(req.method == "OPTIONS"){ return true; @@ -42,7 +41,7 @@ module.exports = { }, shouldInterceptHttpsReq :function(req){ - return false; + return true; } }; diff --git a/proxy.js b/proxy.js index 41f4d8a..0c912c6 100644 --- a/proxy.js +++ b/proxy.js @@ -7,24 +7,24 @@ try{ }catch(e){} var http = require('http'), - https = require('https'), - fs = require('fs'), - async = require("async"), - url = require('url'), - program = require('commander'), - color = require('colorful'), - certMgr = require("./lib/certMgr"), - getPort = require("./lib/getPort"), - requestHandler = require("./lib/requestHandler"), - Recorder = require("./lib/Recorder"), - inherits = require("util").inherits, - util = require("./lib/util"), - entities = require("entities"), - express = require("express"), - path = require("path"), - juicer = require('juicer'), - events = require("events"), - WebSocketServer= require('ws').Server; + https = require('https'), + fs = require('fs'), + async = require("async"), + url = require('url'), + program = require('commander'), + color = require('colorful'), + certMgr = require("./lib/certMgr"), + getPort = require("./lib/getPort"), + requestHandler = require("./lib/requestHandler"), + Recorder = require("./lib/Recorder"), + inherits = require("util").inherits, + util = require("./lib/util"), + entities = require("entities"), + express = require("express"), + path = require("path"), + juicer = require('juicer'), + events = require("events"), + WebSocketServer = require('ws').Server; GLOBAL.recorder = new Recorder();