@wwkit/shared 1.0.16 → 1.0.18
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/package.json +1 -1
- package/src/shell.js +6 -3
package/package.json
CHANGED
package/src/shell.js
CHANGED
|
@@ -303,12 +303,15 @@ const marker = `# >>> wwkit ${name} >>>`
|
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* 按优先级检测可用的网络探测工具
|
|
306
|
-
* 顺序:
|
|
306
|
+
* 顺序: curl > wget > ping
|
|
307
307
|
*
|
|
308
|
-
*
|
|
308
|
+
* curl 优先:支持代理(-x)、输出 locale 无关(HTTP 状态码)、检查 HTTP 层可达性。
|
|
309
|
+
* ping 最后:ICMP 不支持代理、输出依赖系统语言(中文 Windows 乱码)、仅检查网络层。
|
|
310
|
+
*
|
|
311
|
+
* @returns {string|null} 'curl' | 'wget' | 'ping' | null
|
|
309
312
|
*/
|
|
310
313
|
getNetProbeTool() {
|
|
311
|
-
for (const cmd of ['
|
|
314
|
+
for (const cmd of ['curl', 'wget', 'ping']) {
|
|
312
315
|
if (this.isCommandAvailable(cmd)) return cmd
|
|
313
316
|
}
|
|
314
317
|
return null
|