ghostterm 2.0.0 → 2.1.0

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/README.md CHANGED
@@ -1,28 +1,31 @@
1
- # GhostTerm P2P
1
+ # GhostTerm
2
2
 
3
- Control your PC terminal from your phone — direct P2P, no server in between.
3
+ Control your PC terminal from your phone — direct P2P, no relay server.
4
4
 
5
- ## How it works
6
-
7
- 1. Run `npx ghostterm-p2p` on your PC
8
- 2. A 6-digit pair code appears (with a QR code)
9
- 3. Open the mobile site on your phone and enter the code
10
- 4. A direct WebRTC P2P connection is established
11
- 5. All terminal data flows directly between your phone and PC, encrypted end-to-end
12
- 6. The signaling server only helps with the initial pairing — it never sees your terminal data
13
-
14
- ## Install & Run
5
+ ## Quick Start
15
6
 
16
7
  ```bash
17
- npx ghostterm-p2p
8
+ npx ghostterm
18
9
  ```
19
10
 
20
- Or install globally:
11
+ First time: browser opens for Google sign-in (one-time). After that, it remembers you.
21
12
 
22
- ```bash
23
- npm install -g ghostterm-p2p
24
- ghostterm-p2p
25
- ```
13
+ ## How it works
14
+
15
+ 1. Run `npx ghostterm` on your PC
16
+ 2. Open [ghostterm.pages.dev](https://ghostterm.pages.dev) on your phone
17
+ 3. Sign in with the same Google account → auto-connects, no codes needed
18
+ 4. All terminal data flows directly between devices (WebRTC, end-to-end encrypted)
19
+
20
+ ## Features
21
+
22
+ - **Direct P2P** — no relay server, zero latency
23
+ - **End-to-end encrypted** — DTLS encryption, server never sees your data
24
+ - **Google auto-pair** — same account on both sides, no codes needed
25
+ - **4 terminals** — manage multiple sessions with ghost cells
26
+ - **Pixel office** — animated ghost workspace with your terminals
27
+ - **One-tap y/n** — approve Claude Code prompts instantly
28
+ - **File upload** — send files from phone to PC
26
29
 
27
30
  ## Options
28
31
 
@@ -32,13 +35,6 @@ ghostterm-p2p
32
35
  -h, --help Show help
33
36
  ```
34
37
 
35
- ## Security
36
-
37
- - **End-to-end encrypted**: WebRTC DTLS encryption protects all terminal data
38
- - **No data on servers**: The signaling server only relays WebRTC connection setup messages
39
- - **One-time pair codes**: Codes are deleted after use and expire in 5 minutes
40
- - **Brute force protection**: 3 wrong codes = 60 second lockout
41
-
42
38
  ## Requirements
43
39
 
44
40
  - Node.js >= 18
@@ -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.1.0",
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"