mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-10 14:58:27 +00:00
commit for debug
This commit is contained in:
parent
8cb2925dc3
commit
1ddc63cc41
@ -43,6 +43,6 @@ openssl req -new -key $outputPath$domain.key -out $outputPath$domain.csr -passin
|
|||||||
|
|
||||||
#Generating a Self-Signed Certificate
|
#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
|
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
|
#openssl x509 -req -in host.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out host.crt -days 365
|
||||||
echo "Finished"
|
echo "Finished"
|
||||||
|
@ -39,7 +39,6 @@ function getCertificate(hostname,cb){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createCert(hostname,callback){
|
function createCert(hostname,callback){
|
||||||
console.log(hostname);
|
|
||||||
checkRootCA();
|
checkRootCA();
|
||||||
|
|
||||||
var cmd = "./gen-cer __host __path".replace(/__host/,hostname).replace(/__path/,certDir);
|
var cmd = "./gen-cer __host __path".replace(/__host/,hostname).replace(/__path/,certDir);
|
||||||
|
@ -4,7 +4,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shouldUseLocalResponse : function(req,reqBody){
|
shouldUseLocalResponse : function(req,reqBody){
|
||||||
|
|
||||||
//intercept all options request
|
//intercept all options request
|
||||||
if(req.method == "OPTIONS"){
|
if(req.method == "OPTIONS"){
|
||||||
return true;
|
return true;
|
||||||
@ -42,7 +41,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shouldInterceptHttpsReq :function(req){
|
shouldInterceptHttpsReq :function(req){
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
36
proxy.js
36
proxy.js
@ -7,24 +7,24 @@ try{
|
|||||||
}catch(e){}
|
}catch(e){}
|
||||||
|
|
||||||
var http = require('http'),
|
var http = require('http'),
|
||||||
https = require('https'),
|
https = require('https'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
async = require("async"),
|
async = require("async"),
|
||||||
url = require('url'),
|
url = require('url'),
|
||||||
program = require('commander'),
|
program = require('commander'),
|
||||||
color = require('colorful'),
|
color = require('colorful'),
|
||||||
certMgr = require("./lib/certMgr"),
|
certMgr = require("./lib/certMgr"),
|
||||||
getPort = require("./lib/getPort"),
|
getPort = require("./lib/getPort"),
|
||||||
requestHandler = require("./lib/requestHandler"),
|
requestHandler = require("./lib/requestHandler"),
|
||||||
Recorder = require("./lib/Recorder"),
|
Recorder = require("./lib/Recorder"),
|
||||||
inherits = require("util").inherits,
|
inherits = require("util").inherits,
|
||||||
util = require("./lib/util"),
|
util = require("./lib/util"),
|
||||||
entities = require("entities"),
|
entities = require("entities"),
|
||||||
express = require("express"),
|
express = require("express"),
|
||||||
path = require("path"),
|
path = require("path"),
|
||||||
juicer = require('juicer'),
|
juicer = require('juicer'),
|
||||||
events = require("events"),
|
events = require("events"),
|
||||||
WebSocketServer= require('ws').Server;
|
WebSocketServer = require('ws').Server;
|
||||||
|
|
||||||
GLOBAL.recorder = new Recorder();
|
GLOBAL.recorder = new Recorder();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user