whistle 2.9.45 → 2.9.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/assets/menu.html +1 -0
- package/assets/tab.html +2 -0
- package/biz/webui/cgi-bin/get-data.js +6 -2
- package/biz/webui/htdocs/index.html +1 -1
- package/biz/webui/htdocs/js/index.js +16 -16
- package/lib/handlers/file-proxy.js +14 -9
- package/lib/rules/index.js +1 -0
- package/lib/rules/rules.js +3 -2
- package/lib/service/extract-saz.js +3 -0
- package/lib/service/generate-saz.js +1 -0
- package/lib/util/index.js +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
# whistle
|
|
8
8
|
[](https://npmjs.org/package/whistle)
|
|
9
9
|
[](http://nodejs.org/download/)
|
|
10
|
-
[](https://travis-ci.org/avwo/whistle)
|
|
11
10
|
[](https://codecov.io/gh/avwo/whistle)
|
|
12
11
|
[](https://npmjs.org/package/whistle)
|
|
13
12
|
[](https://www.npmjs.com/package/whistle)
|
|
@@ -70,6 +69,10 @@ Whistle 是基于 Node 实现的跨平台抓包调试工具,其主要特点:
|
|
|
70
69
|
### 详细用法参见:[Whistle 帮助文档](https://wproxy.org/whistle/quickstart.html)
|
|
71
70
|
|
|
72
71
|
# 通过 SwitchyOmega 设置代理
|
|
72
|
+
### 安装 SwitchyOmega
|
|
73
|
+
打开 Chrome 扩展商店进行安装 https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif
|
|
74
|
+
|
|
75
|
+
### 配置 SwitchyOmega
|
|
73
76
|
全局代理如果会影响到某些客户端的请求(客户端设置了 ssl pinning),也可以使用 Chrome 插件设置代理(只对 Chrome 生效):
|
|
74
77
|
> 可以通过 `w2 proxy off` 关闭全局代理
|
|
75
78
|
|
package/assets/menu.html
CHANGED
|
@@ -157,6 +157,7 @@
|
|
|
157
157
|
Object.keys(options.msgBox).forEach(function(name) {
|
|
158
158
|
toast[name] = options.msgBox[name];
|
|
159
159
|
});
|
|
160
|
+
whistleBridge.updateUI = options.updateUI;
|
|
160
161
|
whistleBridge.copyText = options.copyText;
|
|
161
162
|
whistleBridge.pageId = options.pageId;
|
|
162
163
|
whistleBridge.compose = options.compose;
|
package/assets/tab.html
CHANGED
|
@@ -282,6 +282,8 @@
|
|
|
282
282
|
});
|
|
283
283
|
getActiveSession = options.getActiveSession;
|
|
284
284
|
getSelectedSessionList = options.getSelectedSessionList;
|
|
285
|
+
whistleBridge.updateUI = options.updateUI;
|
|
286
|
+
whistleBridge.copyText = options.copyText;
|
|
285
287
|
whistleBridge.pageId = options.pageId;
|
|
286
288
|
whistleBridge.compose = options.compose;
|
|
287
289
|
whistleBridge.decodeBase64 = options.decodeBase64;
|
|
@@ -20,6 +20,8 @@ module.exports = function(req, res) {
|
|
|
20
20
|
var stopRecordConsole = data.startLogTime == -3;
|
|
21
21
|
var stopRecordSvrLog = data.startSvrLogTime == -3;
|
|
22
22
|
var h = req.headers;
|
|
23
|
+
var curLogId = proxy.getLatestId();
|
|
24
|
+
var curSvrLogId = logger.getLatestId();
|
|
23
25
|
util.sendGzip(req, res, {
|
|
24
26
|
ec: 0,
|
|
25
27
|
version: config.version,
|
|
@@ -36,8 +38,10 @@ module.exports = function(req, res) {
|
|
|
36
38
|
mvaluesTime: config.mvaluesTime,
|
|
37
39
|
server: util.getServerInfo(req),
|
|
38
40
|
hasARules: rulesUtil.hasAccountRules ? 1 : undefined,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
curLogId: stopRecordConsole ? undefined : curLogId,
|
|
42
|
+
curSvrLogId: stopRecordSvrLog ? undefined : curSvrLogId,
|
|
43
|
+
lastLogId: stopRecordConsole ? curLogId : undefined,
|
|
44
|
+
lastSvrLogId: stopRecordSvrLog ? curSvrLogId : undefined,
|
|
41
45
|
log: stopRecordConsole ? [] : proxy.getLogs(data.startLogTime, data.count, data.logId),
|
|
42
46
|
svrLog: stopRecordSvrLog ? [] : logger.getLogs(data.startSvrLogTime, data.count),
|
|
43
47
|
plugins: pluginMgr.getPlugins(),
|