mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-06-07 01:38:21 +00:00
update changelog, do some tiny adjustment
This commit is contained in:
parent
531f4d0421
commit
130610fed6
@ -1,3 +1,9 @@
|
||||
31 July: AnyProxy 3.7.3:
|
||||
|
||||
* show lastest 100 records when visit the web ui
|
||||
* save map-local config file to local file
|
||||
* show an indicator when filter or map-local is in use
|
||||
|
||||
31 July: AnyProxy 3.7.2:
|
||||
|
||||
* bugfix for issue #29
|
||||
|
@ -47,7 +47,8 @@ function resToMsg(msg,cb){
|
||||
//config.port
|
||||
function wsServer(config){
|
||||
//web socket interface
|
||||
var wss = new WebSocketServer({port: config.port});
|
||||
var self = this,
|
||||
wss = new WebSocketServer({port: config.port});
|
||||
wss.broadcast = function(data) {
|
||||
var key = data.id;
|
||||
if(typeof data == "object"){
|
||||
@ -86,9 +87,12 @@ function wsServer(config){
|
||||
}
|
||||
});
|
||||
|
||||
//Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding
|
||||
self.wss = wss;
|
||||
}
|
||||
|
||||
return wss;
|
||||
wsServer.prototype.closeAll = function(){
|
||||
var self = this;
|
||||
self.wss.close();
|
||||
}
|
||||
|
||||
module.exports = wsServer;
|
5
proxy.js
5
proxy.js
@ -64,7 +64,8 @@ function proxyServer(option){
|
||||
proxyConfigPort = option.webConfigPort || DEFAULT_CONFIG_PORT, //port to ui config server
|
||||
disableWebInterface = !!option.disableWebInterface,
|
||||
ifSilent = !!option.silent,
|
||||
webServerInstance;
|
||||
webServerInstance,
|
||||
ws;
|
||||
|
||||
if(ifSilent){
|
||||
logUtil.setPrintStatus(false);
|
||||
@ -130,7 +131,7 @@ function proxyServer(option){
|
||||
|
||||
//start web socket service
|
||||
function(callback){
|
||||
var ws = new wsServer({port : socketPort});
|
||||
ws = new wsServer({port : socketPort});
|
||||
callback(null)
|
||||
},
|
||||
|
||||
|
@ -26,11 +26,12 @@ function anyproxy_wsUtil(config){
|
||||
|
||||
var self = this;
|
||||
var baseUrl = config.baseUrl || "127.0.0.1",
|
||||
socketPort = config.port || 8003;
|
||||
|
||||
var dataSocket = new WebSocket("ws://" + baseUrl + ":" + socketPort);
|
||||
socketPort = config.port || 8003,
|
||||
dataSocket;
|
||||
|
||||
function initSocket(){
|
||||
self.bodyCbMap = {};
|
||||
dataSocket = new WebSocket("ws://" + baseUrl + ":" + socketPort);
|
||||
dataSocket.onmessage = function(event){
|
||||
config.onGetData && config.onGetData.call(self,event.data);
|
||||
|
||||
@ -66,6 +67,9 @@ function anyproxy_wsUtil(config){
|
||||
}
|
||||
|
||||
self.dataSocket = dataSocket;
|
||||
}
|
||||
|
||||
initSocket();
|
||||
};
|
||||
|
||||
anyproxy_wsUtil.prototype.send = function(data){
|
||||
|
10
web/page.js
10
web/page.js
@ -436,11 +436,12 @@
|
||||
|
||||
var self = this;
|
||||
var baseUrl = config.baseUrl || "127.0.0.1",
|
||||
socketPort = config.port || 8003;
|
||||
|
||||
var dataSocket = new WebSocket("ws://" + baseUrl + ":" + socketPort);
|
||||
socketPort = config.port || 8003,
|
||||
dataSocket;
|
||||
|
||||
function initSocket(){
|
||||
self.bodyCbMap = {};
|
||||
dataSocket = new WebSocket("ws://" + baseUrl + ":" + socketPort);
|
||||
dataSocket.onmessage = function(event){
|
||||
config.onGetData && config.onGetData.call(self,event.data);
|
||||
|
||||
@ -476,6 +477,9 @@
|
||||
}
|
||||
|
||||
self.dataSocket = dataSocket;
|
||||
}
|
||||
|
||||
initSocket();
|
||||
};
|
||||
|
||||
anyproxy_wsUtil.prototype.send = function(data){
|
||||
|
Loading…
x
Reference in New Issue
Block a user