ghostterm 2.0.0 → 2.0.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/bin/ghostterm-p2p.js +7 -1
- package/package.json +1 -1
package/bin/ghostterm-p2p.js
CHANGED
|
@@ -18,7 +18,7 @@ const { getToken, saveToken } = require('../lib/auth');
|
|
|
18
18
|
|
|
19
19
|
// --- Configuration ---
|
|
20
20
|
const DEFAULT_SIGNALING = 'wss://ghostterm-p2p-signal.fly.dev';
|
|
21
|
-
const SITE_URL = 'https://ghostterm
|
|
21
|
+
const SITE_URL = 'https://ghostterm.pages.dev';
|
|
22
22
|
|
|
23
23
|
const args = process.argv.slice(2);
|
|
24
24
|
const signalingUrl = getArg('--signal', '-s') || DEFAULT_SIGNALING;
|
|
@@ -205,6 +205,12 @@ function initiateWebRTC() {
|
|
|
205
205
|
|
|
206
206
|
// Wire WebRTC messages to PTY
|
|
207
207
|
webrtc.on('message', (msg) => {
|
|
208
|
+
if (msg.type === 'shutdown') {
|
|
209
|
+
console.log('\n Shutdown requested from mobile. Bye!');
|
|
210
|
+
cleanupWebRTC();
|
|
211
|
+
if (ws) ws.close();
|
|
212
|
+
process.exit(0);
|
|
213
|
+
}
|
|
208
214
|
if (msg.type === 'resize') {
|
|
209
215
|
console.log(` [resize] cols=${msg.cols} rows=${msg.rows} sid=${msg.sessionId || 'attached'}`);
|
|
210
216
|
}
|