shell-cluster
Advanced tools
+1
-1
| { | ||
| "name": "shell-cluster", | ||
| "version": "1.0.9", | ||
| "version": "1.0.10", | ||
| "description": "Decentralized remote shell access via tunnels — Node.js server with node-pty and xterm-headless", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
+1
-1
@@ -9,3 +9,3 @@ // --- State --- | ||
| let loadingSessions = false; | ||
| let daemonWsUrl = 'ws://127.0.0.1:9000'; // TODO: make configurable from frontend | ||
| let daemonWsUrl = `ws://${location.host}`; | ||
@@ -12,0 +12,0 @@ // Convert ws(s):// URL to http(s):// |
@@ -172,2 +172,3 @@ /** | ||
| } catch (e) { | ||
| console.warn(`[DashboardServer] Proxy: invalid init JSON: ${data.toString('utf-8').slice(0, 200)}`); | ||
| browserWs.close(1008, 'Invalid init message'); | ||
@@ -177,2 +178,3 @@ return; | ||
| console.log(`[DashboardServer] Proxy init: target=${init.target} path=${init.path}`); | ||
| const targetUri = init.target; | ||
@@ -179,0 +181,0 @@ if (!targetUri) { |
+23
-0
@@ -13,2 +13,3 @@ /** | ||
| const os = require('os'); | ||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
@@ -24,2 +25,24 @@ const { Terminal } = require('@xterm/headless'); | ||
| pty = require('node-pty'); | ||
| // Fix spawn-helper permissions at runtime (npx installs may lose +x) | ||
| if (process.platform !== 'win32') { | ||
| try { | ||
| const ptyDir = path.dirname(require.resolve('node-pty')); | ||
| const helperCandidates = [ | ||
| path.join(ptyDir, '..', 'prebuilds', `${process.platform}-${process.arch}`, 'spawn-helper'), | ||
| path.join(ptyDir, 'prebuilds', `${process.platform}-${process.arch}`, 'spawn-helper'), | ||
| ]; | ||
| for (const h of helperCandidates) { | ||
| if (fs.existsSync(h)) { | ||
| const stat = fs.statSync(h); | ||
| if (!(stat.mode & 0o111)) { | ||
| fs.chmodSync(h, 0o755); | ||
| console.log(`[ShellManager] Fixed spawn-helper permissions: ${h}`); | ||
| } | ||
| break; | ||
| } | ||
| } | ||
| } catch (e) { | ||
| // best-effort | ||
| } | ||
| } | ||
| } catch (e) { | ||
@@ -26,0 +49,0 @@ ptyLoadError = e.message; |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
117488
0.84%3302
0.76%20
5.26%