whistle 2.8.4 → 2.8.8
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/CHANGELOG.md +18 -0
- package/bin/plugin.js +7 -0
- package/bin/util.js +1 -1
- package/biz/webui/cgi-bin/certs/all.js +8 -0
- package/biz/webui/cgi-bin/certs/remove.js +8 -0
- package/biz/webui/cgi-bin/certs/upload.js +8 -0
- package/biz/webui/cgi-bin/util.js +2 -1
- package/biz/webui/htdocs/index.html +1 -1
- package/biz/webui/htdocs/js/index.js +45 -45
- package/biz/webui/lib/index.js +5 -2
- package/lib/config.js +18 -14
- package/lib/https/ca.js +198 -67
- package/lib/https/h2.js +1 -1
- package/lib/https/index.js +40 -90
- package/lib/https/load-cert.js +66 -0
- package/lib/index.js +23 -5
- package/lib/init.js +2 -0
- package/lib/inspectors/log.js +6 -8
- package/lib/inspectors/weinre.js +7 -9
- package/lib/plugins/index.js +6 -1
- package/lib/plugins/load-plugin.js +45 -6
- package/lib/rules/dns.js +1 -1
- package/lib/rules/index.js +42 -23
- package/lib/rules/rules.js +50 -5
- package/lib/tunnel.js +7 -1
- package/lib/upgrade.js +5 -1
- package/lib/util/common.js +1 -1
- package/lib/util/index.js +56 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# v2.8.8
|
|
2
|
+
1. feat: 支持通过 `enable://useLocalHost` 和 `enable://useSafePort` 修改 log 和 weinre 请求 URL 的域名或端口
|
|
3
|
+
2. style: 界面提供 `api.selectIndex` 选中指定下标的抓包数据
|
|
4
|
+
3. feat: 支持插件获取 `originalReq.remoteAddress` 与 `originalReq.remotePort`
|
|
5
|
+
|
|
6
|
+
# v2.8.7
|
|
7
|
+
1. feat: `--httpsPort` 启动的 HTTPS Server 支持从插件获取证书
|
|
8
|
+
2. feat: 支持通过 `excludeFilter://from=httpServer`、`includeFilter://from=httpsServer`、`excludeFilter://from=httpServer`、`includeFilter://from=httpsServer` 过滤请求
|
|
9
|
+
|
|
10
|
+
# v2.8.6
|
|
11
|
+
1. refactor: 禁止通过页面上传根证书 `root.key & root.crt`
|
|
12
|
+
2. refactor: Whistle 自动生成的证书过期时自动续期(有效期一年)
|
|
13
|
+
|
|
14
|
+
# v2.8.5
|
|
15
|
+
1. feat: 支持通过 `ignore://-*` 过滤 `ignore://*`
|
|
16
|
+
2. feat: 支持 `proxy` 和 `pac` 配置 `lineProps://proxyHostOnly`,当用户配置了 `host` 代理才会生效
|
|
17
|
+
3. feat: 非 SNI 请求也支持通过插件自定义证书,且支持直接上传和删除用户自定义证书
|
|
18
|
+
|
|
1
19
|
# v2.8.4
|
|
2
20
|
1. fix: 可能无法导入 saz 文件问题
|
|
3
21
|
|
package/bin/plugin.js
CHANGED
|
@@ -95,6 +95,13 @@ function install(cmd, name, argv) {
|
|
|
95
95
|
removeDir(installPath);
|
|
96
96
|
} catch (e) {}
|
|
97
97
|
}
|
|
98
|
+
try {
|
|
99
|
+
var pkgPath = path.join(realPath, 'node_modules', name, 'package.json');
|
|
100
|
+
if (fs.statSync(pkgPath).mtime.getFullYear() < 2010) {
|
|
101
|
+
var now = new Date();
|
|
102
|
+
fs.utimesSync(pkgPath, now, now);
|
|
103
|
+
}
|
|
104
|
+
} catch (e) {}
|
|
98
105
|
}
|
|
99
106
|
});
|
|
100
107
|
}
|
package/bin/util.js
CHANGED
|
@@ -76,7 +76,7 @@ function showUsage(isRunning, options, restart) {
|
|
|
76
76
|
var list = options.host ? [options.host] : getIpList();
|
|
77
77
|
info('[i] 1. use your device to visit the following URL list, gets the ' + colors.bold('IP') + ' of the URL you can access:');
|
|
78
78
|
info(list.map(function(ip) {
|
|
79
|
-
return ' http://' + colors.bold(ip) + (port ? ':' + port : '') + '/';
|
|
79
|
+
return ' http://' + colors.bold(ip) + (port && port != 80 ? ':' + port : '') + '/';
|
|
80
80
|
}).join('\n'));
|
|
81
81
|
|
|
82
82
|
warn(' Note: If all the above URLs are unable to access, check the firewall settings');
|
|
@@ -8,7 +8,7 @@ var PID = process.pid;
|
|
|
8
8
|
var MAX_OBJECT_SIZE = 1024 * 1024 * 6;
|
|
9
9
|
var index = 0;
|
|
10
10
|
var dnsOverHttps = config.dnsOverHttps;
|
|
11
|
-
|
|
11
|
+
var doh = !!dnsOverHttps;
|
|
12
12
|
|
|
13
13
|
exports.getClientId = function() {
|
|
14
14
|
if (index > 9999) {
|
|
@@ -25,6 +25,7 @@ exports.getServerInfo = function(req) {
|
|
|
25
25
|
var info = {
|
|
26
26
|
pid: PID,
|
|
27
27
|
pInfo: proc,
|
|
28
|
+
dcc: config.disableCustomCerts,
|
|
28
29
|
dns: dnsOverHttps || config.dnsServer,
|
|
29
30
|
doh: doh,
|
|
30
31
|
df: config.dnsOptional,
|