mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-20 15:54:21 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9559fae4bf | ||
|
80176fcc46 | ||
|
51bee445de |
@ -1,3 +1,6 @@
|
||||
25 March 2019: AnyProxy 3.10.5:
|
||||
* add callback parameter in `fs.writeFile` which is required in Node.js 10.0.0+
|
||||
|
||||
26 Feb 2016: AnyProxy 3.10.4:
|
||||
|
||||
* let users assign the port for web socket in AnyProxy cli
|
||||
|
@ -1,6 +1,6 @@
|
||||
//start recording and share a list when required
|
||||
var zlib = require('zlib'),
|
||||
Datastore = require('nedb'),
|
||||
Datastore = require('nedb'),
|
||||
util = require("util"),
|
||||
path = require("path"),
|
||||
fs = require("fs"),
|
||||
@ -31,17 +31,17 @@ function Recorder(option){
|
||||
logUtil.printLog("db file : " + option.filename);
|
||||
|
||||
}catch(e){
|
||||
logUtil.printLog(e, logUtil.T_ERR);
|
||||
logUtil.printLog(e, logUtil.T_ERR);
|
||||
logUtil.printLog("Failed to load on-disk db file. Will use in-meomory db instead.", logUtil.T_ERR);
|
||||
db = new Datastore();
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
//in-memory db
|
||||
db = new Datastore();
|
||||
}
|
||||
|
||||
self.recordBodyMap = []; // id - body
|
||||
self.recordBodyMap = []; // id - body
|
||||
|
||||
self.emitUpdate = function(id,info){
|
||||
if(info){
|
||||
@ -100,7 +100,7 @@ function Recorder(option){
|
||||
//add to body map
|
||||
//ignore image data
|
||||
var bodyFile = path.join(cachePath,BODY_FILE_PRFIX + id);
|
||||
fs.writeFile(bodyFile, info.resBody);
|
||||
fs.writeFile(bodyFile, info.resBody, function() {});
|
||||
};
|
||||
|
||||
self.getBody = function(id,cb){
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "anyproxy",
|
||||
"version": "3.10.4",
|
||||
"version": "3.10.6",
|
||||
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
|
||||
"main": "proxy.js",
|
||||
"bin": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user