whistle 2.10.3 → 2.10.5
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/assets/menu.html +0 -1
- package/assets/modal.html +0 -1
- package/assets/tab.html +0 -1
- package/bin/proxy.js +2 -2
- package/biz/webui/cgi-bin/add-rules-values.js +1 -1
- package/biz/webui/cgi-bin/check-update.js +0 -1
- package/biz/webui/cgi-bin/do-not-show-again.js +1 -1
- package/biz/webui/cgi-bin/enable-http2.js +1 -1
- package/biz/webui/cgi-bin/get-matched-rules.js +14 -0
- package/biz/webui/cgi-bin/hide-https-connects.js +1 -1
- package/biz/webui/cgi-bin/intercept-https-connects.js +1 -1
- package/biz/webui/cgi-bin/plugins/disable-all-plugins.js +1 -1
- package/biz/webui/cgi-bin/reset-local-address.js +1 -1
- package/biz/webui/cgi-bin/rules/allow-multiple-choice.js +1 -1
- package/biz/webui/cgi-bin/rules/clear-dns-cache.js +1 -1
- package/biz/webui/cgi-bin/rules/disable-all-rules.js +1 -1
- package/biz/webui/cgi-bin/rules/disable-default.js +1 -1
- package/biz/webui/cgi-bin/rules/enable-back-rules-first.js +1 -1
- package/biz/webui/cgi-bin/rules/enable-default.js +1 -1
- package/biz/webui/cgi-bin/rules/move-to.js +1 -1
- package/biz/webui/cgi-bin/rules/remove.js +1 -1
- package/biz/webui/cgi-bin/rules/rename.js +1 -1
- package/biz/webui/cgi-bin/rules/select.js +1 -1
- package/biz/webui/cgi-bin/rules/set-sys-hosts.js +1 -1
- package/biz/webui/cgi-bin/rules/unselect.js +1 -1
- package/biz/webui/cgi-bin/util.js +0 -1
- package/biz/webui/cgi-bin/values/move-to.js +1 -1
- package/biz/webui/cgi-bin/values/remove.js +1 -1
- package/biz/webui/cgi-bin/values/rename.js +1 -1
- package/biz/webui/htdocs/index.html +1 -1
- package/biz/webui/htdocs/js/index.js +52 -54
- package/lib/config.js +1 -0
- package/lib/https/index.js +1 -0
- package/lib/inspectors/data.js +2 -1
- package/lib/rules/rules.js +5 -5
- package/lib/service/composer.js +77 -35
- package/lib/tunnel.js +3 -0
- package/lib/upgrade.js +1 -0
- package/lib/util/common.js +11 -1
- package/lib/util/data-server.js +10 -0
- package/lib/util/index.js +14 -15
- package/package.json +2 -2
package/assets/menu.html
CHANGED
|
@@ -200,7 +200,6 @@
|
|
|
200
200
|
whistleBridge.compose = options.compose;
|
|
201
201
|
whistleBridge.composeInterrupt = options.createComposeInterrupt();
|
|
202
202
|
whistleBridge.getWhistleId = options.getWhistleId;
|
|
203
|
-
whistleBridge.hasWhistleToken = options.hasWhistleToken;
|
|
204
203
|
whistleBridge.decodeBase64 = options.decodeBase64;
|
|
205
204
|
whistleBridge.joinBase64 = options.joinBase64;
|
|
206
205
|
whistleBridge.getReqId = options.getReqId;
|
package/assets/modal.html
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
whistleBridge.compose = options.compose;
|
|
24
24
|
whistleBridge.composeInterrupt = options.createComposeInterrupt();
|
|
25
25
|
whistleBridge.getWhistleId = options.getWhistleId;
|
|
26
|
-
whistleBridge.hasWhistleToken = options.hasWhistleToken;
|
|
27
26
|
whistleBridge.decodeBase64 = options.decodeBase64;
|
|
28
27
|
whistleBridge.joinBase64 = options.joinBase64;
|
|
29
28
|
whistleBridge.getReqId = options.getReqId;
|
package/assets/tab.html
CHANGED
|
@@ -292,7 +292,6 @@
|
|
|
292
292
|
whistleBridge.compose = options.compose;
|
|
293
293
|
whistleBridge.composeInterrupt = options.createComposeInterrupt();
|
|
294
294
|
whistleBridge.getWhistleId = options.getWhistleId;
|
|
295
|
-
whistleBridge.hasWhistleToken = options.hasWhistleToken;
|
|
296
295
|
whistleBridge.decodeBase64 = options.decodeBase64;
|
|
297
296
|
whistleBridge.joinBase64 = options.joinBase64;
|
|
298
297
|
whistleBridge.getReqId = options.getReqId;
|
package/bin/proxy.js
CHANGED
|
@@ -24,9 +24,9 @@ function enableProxy(options) {
|
|
|
24
24
|
try {
|
|
25
25
|
var host = util.joinIpPort(options.host, options.port);
|
|
26
26
|
if (proxy.enableProxy(options)) {
|
|
27
|
-
showInfo('Successfully
|
|
27
|
+
showInfo('Successfully enabled system proxy (' + host + ')');
|
|
28
28
|
} else {
|
|
29
|
-
showError('Failed to
|
|
29
|
+
showError('Failed to enable system proxy (' + host + ')');
|
|
30
30
|
}
|
|
31
31
|
} catch (e) {
|
|
32
32
|
showError(e.message);
|
|
@@ -11,7 +11,6 @@ module.exports = function(req, res) {
|
|
|
11
11
|
|
|
12
12
|
res.json({
|
|
13
13
|
ec: 0,
|
|
14
|
-
em: 'success',
|
|
15
14
|
showUpdate: !config.disableUpdateTips && hasNewVersion > 1 && common.compareVersion(latestVersion, doNotShowAgainVersion) > 1,
|
|
16
15
|
hasNewVersion: hasNewVersion > 0,
|
|
17
16
|
hasUpdater: config.hasUpdater,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var proxy = require('../lib/proxy');
|
|
2
|
+
var util = require('./util');
|
|
3
|
+
|
|
4
|
+
module.exports = function(req, res) {
|
|
5
|
+
var testId = req.query.testId;
|
|
6
|
+
var item = testId && proxy.getTestItem(testId);
|
|
7
|
+
if (!item) {
|
|
8
|
+
return res.json({});
|
|
9
|
+
}
|
|
10
|
+
util.sendGzip(req, res, {
|
|
11
|
+
realUrl: item.realUrl,
|
|
12
|
+
rules: item.rules
|
|
13
|
+
});
|
|
14
|
+
};
|
|
@@ -5,7 +5,7 @@ module.exports = function(req, res) {
|
|
|
5
5
|
var enable = req.body.allowMultipleChoice == 1;
|
|
6
6
|
properties.set('allowMultipleChoice', enable);
|
|
7
7
|
proxy.emit('rulesDataChange', 'allowMultipleChoice', enable);
|
|
8
|
-
res.json({ec: 0
|
|
8
|
+
res.json({ec: 0});
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,5 +2,5 @@ var rules = require('../../../../lib/rules/util').rules;
|
|
|
2
2
|
|
|
3
3
|
module.exports = function(req, res) {
|
|
4
4
|
rules.disableDefault();
|
|
5
|
-
res.json({ec: 0,
|
|
5
|
+
res.json({ec: 0, defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList()});
|
|
6
6
|
};
|
|
@@ -3,5 +3,5 @@ var rules = require('../../../../lib/rules/util').rules;
|
|
|
3
3
|
module.exports = function(req, res) {
|
|
4
4
|
rules.enableDefault();
|
|
5
5
|
rules.setDefault(req.body.value, req.body.clientId);
|
|
6
|
-
res.json({ec: 0,
|
|
6
|
+
res.json({ec: 0, defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList()});
|
|
7
7
|
};
|
|
@@ -3,5 +3,5 @@ var rules = require('../../../../lib/rules/util').rules;
|
|
|
3
3
|
module.exports = function(req, res) {
|
|
4
4
|
var body = req.body;
|
|
5
5
|
var result = rules.moveTo(body.from, body.to, body.clientId, body.group === 'true', body.toTop === 'true');
|
|
6
|
-
res.json({ec: result ? 0 : 2
|
|
6
|
+
res.json({ec: result ? 0 : 2});
|
|
7
7
|
};
|
|
@@ -12,5 +12,5 @@ module.exports = function(req, res) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
rules.select(req.body.name);
|
|
15
|
-
res.json({ec: 0,
|
|
15
|
+
res.json({ec: 0, defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList(), changed: changed});
|
|
16
16
|
};
|
|
@@ -2,6 +2,6 @@ var rules = require('../../../../lib/rules/util').rules;
|
|
|
2
2
|
|
|
3
3
|
module.exports = function(req, res) {
|
|
4
4
|
rules.setSysHosts(req.body.hosts, function(err) {
|
|
5
|
-
res.json({ec: err ? 2 : 0, em: err ? err.stack :
|
|
5
|
+
res.json({ec: err ? 2 : 0, em: err ? err.stack : undefined});
|
|
6
6
|
});
|
|
7
7
|
};
|
|
@@ -3,5 +3,5 @@ var rules = require('../../../../lib/rules/util').rules;
|
|
|
3
3
|
module.exports = function(req, res) {
|
|
4
4
|
rules.add(req.body.name, req.body.value);
|
|
5
5
|
rules.unselect(req.body.name);
|
|
6
|
-
res.json({ec: 0,
|
|
6
|
+
res.json({ec: 0, defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList()});
|
|
7
7
|
};
|
|
@@ -3,5 +3,5 @@ var values = require('../../../../lib/rules/util').values;
|
|
|
3
3
|
module.exports = function(req, res) {
|
|
4
4
|
var body = req.body;
|
|
5
5
|
var result = values.moveTo(body.from, body.to, body.clientId, body.group === 'true');
|
|
6
|
-
res.json({ec: result ? 0 : 2
|
|
6
|
+
res.json({ec: result ? 0 : 2});
|
|
7
7
|
};
|