mihomo-cli 1.4.0 → 1.4.1
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 +11 -0
- package/index.js +10 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -202,7 +202,7 @@ function printStatus() {
|
|
|
202
202
|
if (info && status.running) {
|
|
203
203
|
modeLabel = colors.cyan(info.tun ? ' (TUN)' : ' (Mixed)');
|
|
204
204
|
}
|
|
205
|
-
const statusText = status.running ? colors.green('● 运行中') : colors.yellow('
|
|
205
|
+
const statusText = status.running ? colors.green('● 运行中') : colors.yellow('不在运行');
|
|
206
206
|
console.log(colors.gray('状态: ') + statusText + modeLabel);
|
|
207
207
|
console.log(colors.gray('内核: ') + (status.kernelVersion || '未安装'));
|
|
208
208
|
|
|
@@ -307,7 +307,7 @@ async function cmdStart(args) {
|
|
|
307
307
|
async function cmdStop() {
|
|
308
308
|
const pids = processManager.getAllMihomoPids();
|
|
309
309
|
if (pids.length === 0) {
|
|
310
|
-
console.log(colors.yellow('
|
|
310
|
+
console.log(colors.yellow('不在运行'));
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
313
|
|
|
@@ -513,10 +513,10 @@ async function printSubscriptionList() {
|
|
|
513
513
|
const defaultMark = i === 0 ? colors.green(' [默认]') : '';
|
|
514
514
|
const interval = s.update_interval || subscription.DEFAULT_UPDATE_INTERVAL_HOURS;
|
|
515
515
|
console.log(' ' + (i + 1) + '. ' + s.name + defaultMark);
|
|
516
|
-
console.log(' ' + colors.gray('更新:') +
|
|
516
|
+
console.log(' ' + colors.gray('更新: ') + time + ' (间隔: ' + interval + 'h)');
|
|
517
517
|
|
|
518
518
|
if (s.username) {
|
|
519
|
-
console.log(' ' + colors.gray('用户:') +
|
|
519
|
+
console.log(' ' + colors.gray('用户: ') + s.username);
|
|
520
520
|
}
|
|
521
521
|
if (s.download !== undefined || s.total !== undefined) {
|
|
522
522
|
const used = (s.upload || 0) + (s.download || 0);
|
|
@@ -527,13 +527,13 @@ async function printSubscriptionList() {
|
|
|
527
527
|
const percent = Math.min((used / s.total) * 100, 100);
|
|
528
528
|
percentStr = ' (' + percent.toFixed(1) + '%)';
|
|
529
529
|
}
|
|
530
|
-
console.log(' ' + colors.gray('流量:') +
|
|
530
|
+
console.log(' ' + colors.gray('流量: ') + usedStr + ' / ' + totalStr + percentStr);
|
|
531
531
|
}
|
|
532
532
|
if (s.expire !== undefined) {
|
|
533
|
-
console.log(' ' + colors.gray('到期:') +
|
|
533
|
+
console.log(' ' + colors.gray('到期: ') + utils.formatTimestamp(s.expire));
|
|
534
534
|
}
|
|
535
535
|
if (s.web_page_url) {
|
|
536
|
-
console.log(' ' + colors.gray('页面:') +
|
|
536
|
+
console.log(' ' + colors.gray('页面: ') + s.web_page_url);
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
539
|
console.log('');
|
|
@@ -921,8 +921,8 @@ async function cmdReset(args) {
|
|
|
921
921
|
function printOverwriteList() {
|
|
922
922
|
const info = overwrite.listOverwriteFile();
|
|
923
923
|
const statusText = info.enabled ? colors.green('已启用') : colors.yellow('已禁用');
|
|
924
|
-
console.log(colors.gray('状态:') +
|
|
925
|
-
console.log(colors.gray('目录:') +
|
|
924
|
+
console.log(colors.gray('状态: ') + statusText);
|
|
925
|
+
console.log(colors.gray('目录: ') + info.dir);
|
|
926
926
|
console.log('');
|
|
927
927
|
if (info.files.length === 0) {
|
|
928
928
|
console.log('暂无覆写文件');
|
|
@@ -936,7 +936,7 @@ function printOverwriteList() {
|
|
|
936
936
|
const num = i < 10 ? ' ' + i : '' + i;
|
|
937
937
|
console.log(' ' + num + '. ' + f.name);
|
|
938
938
|
if (f.keys.length > 0) {
|
|
939
|
-
console.log(' ' + colors.gray('字段:') +
|
|
939
|
+
console.log(' ' + colors.gray('字段: ') + f.keys.join(', '));
|
|
940
940
|
}
|
|
941
941
|
});
|
|
942
942
|
console.log('');
|