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.
@@ -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-p2p.pages.dev';
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostterm",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Control your PC terminal from your phone — direct P2P, no server in between",
5
5
  "bin": {
6
6
  "ghostterm": "bin/ghostterm-p2p.js"