@aiyiran/myclaw 1.0.178 → 1.0.179
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/start.js +12 -8
package/package.json
CHANGED
package/start.js
CHANGED
|
@@ -67,15 +67,19 @@ function startWindows() {
|
|
|
67
67
|
console.log('');
|
|
68
68
|
|
|
69
69
|
// Step 2.5: 自动检测虚拟机屏蔽(safe)
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
console.log('
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
// const SAFE_ENABLED = true;
|
|
71
|
+
const SAFE_ENABLED = false;
|
|
72
|
+
if (SAFE_ENABLED) {
|
|
73
|
+
console.log('[safe] 虚拟机屏蔽...');
|
|
74
|
+
const restrict = require('./restrict');
|
|
75
|
+
if (restrict.isAlreadySafe()) {
|
|
76
|
+
console.log(' ' + C.g + '[已开启]' + C.nc);
|
|
77
|
+
} else {
|
|
78
|
+
console.log(' ' + C.y + '[未开启,正在启用...]' + C.nc);
|
|
79
|
+
try { execSync('myclaw safe', { stdio: 'inherit', timeout: 30000 }); } catch {}
|
|
80
|
+
}
|
|
81
|
+
console.log('');
|
|
77
82
|
}
|
|
78
|
-
console.log('');
|
|
79
83
|
|
|
80
84
|
// Step 3: 检查 Gateway
|
|
81
85
|
console.log('[3/4] Gateway...');
|