mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 15:51:25 +00:00
recover tips for web server
This commit is contained in:
parent
172b6ac455
commit
e2ee6c996a
@ -2,7 +2,7 @@ var isRootCAFileExists = require("./certMgr.js").isRootCAFileExists();
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
summary:function(){
|
summary:function(){
|
||||||
var tip = "the default rule for anyproxy, support : CORS";
|
var tip = "the default rule for anyproxy, support : CORS. ";
|
||||||
if(isRootCAFileExists){
|
if(isRootCAFileExists){
|
||||||
tip += "\nRoot CA exists, will intercept all https requests for you";
|
tip += "\nRoot CA exists, will intercept all https requests for you";
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "anyproxy",
|
"name": "anyproxy",
|
||||||
"version": "2.4.3",
|
"version": "2.4.4",
|
||||||
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
|
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
|
||||||
"main": "proxy.js",
|
"main": "proxy.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
8
proxy.js
8
proxy.js
@ -119,6 +119,11 @@ function proxyServer(option){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//kill web server when father process exits
|
||||||
|
process.on("exit",function(){
|
||||||
|
child_webServer.kill();
|
||||||
|
});
|
||||||
|
|
||||||
GLOBAL.recorder.on("update",function(data){
|
GLOBAL.recorder.on("update",function(data){
|
||||||
child_webServer.send({
|
child_webServer.send({
|
||||||
type: "update",
|
type: "update",
|
||||||
@ -131,6 +136,9 @@ function proxyServer(option){
|
|||||||
console.log(arguments);
|
console.log(arguments);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
var tipText = "web interface started at port " + proxyWebPort;
|
||||||
|
console.log(color.green(tipText));
|
||||||
|
|
||||||
callback(null);
|
callback(null);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -63,8 +63,6 @@ function proxyWebServer(port,webSocketPort,proxyConfigPort,ruleSummary,recorder)
|
|||||||
|
|
||||||
app.listen(port);
|
app.listen(port);
|
||||||
|
|
||||||
var tipText = "web interface started at port " + port;
|
|
||||||
|
|
||||||
//web socket interface
|
//web socket interface
|
||||||
var wss = new WebSocketServer({port: webSocketPort});
|
var wss = new WebSocketServer({port: webSocketPort});
|
||||||
wss.on("connection",function(ws){});
|
wss.on("connection",function(ws){});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user