@miraj181/ipingyou 2.0.0 β†’ 2.0.3

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 skmirajulislam
3
+ Copyright (c) 2026 Sk Mirajul Islam
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,73 +1,106 @@
1
- # πŸ”— iPingYou β€” SecureLink CLI
1
+ <div align="center">
2
+ <h1>πŸ”— iPingYou β€” SecureLink CLI v2.0</h1>
3
+ <p><strong>Military-Grade, Zero-Knowledge P2P Remote Access & Collaboration Tool</strong></p>
2
4
 
3
- Secure peer-to-peer remote access via SSH & Cloudflare Tunnels. A zero-configuration Node.js CLI tool that lets two machines establish an encrypted SSH connection through Cloudflare's network, instantly.
5
+ [![npm version](https://img.shields.io/npm/v/@miraj181/ipingyou.svg?style=flat-square)](https://www.npmjs.com/package/@miraj181/ipingyou)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
7
+ [![Node.js Version](https://img.shields.io/node/v/@miraj181/ipingyou.svg?style=flat-square)](https://nodejs.org)
8
+ </div>
4
9
 
5
- ## Architecture
10
+ ---
6
11
 
7
- ```
8
- Host Machine Client Machine
9
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” POST GET β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
10
- β”‚ cloudflared │──/register──▢[Broker Server]◀─/resolve──│ ipingyou β”‚
11
- β”‚ tunnel :22 β”‚ {uid,url} (Render Hosted) /:uid β”‚ connect β”‚
12
- β”‚ β”‚ AES-256-CBC β”‚ β”‚
13
- β”‚ SSH daemon │◀───────────── ─────────────│ SSH via β”‚
14
- β”‚ β”‚ cloudflared ProxyCmd β”‚ ProxyCmd β”‚
15
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ TCP proxy β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
16
- ```
12
+ **iPingYou** is a zero-configuration Node.js CLI that establishes AES-encrypted, peer-to-peer SSH tunnels using Cloudflare's Edge network. Version 2.0 introduces **End-to-End Encrypted WebSockets**, **Terminal Mirroring**, **Passwordless Ephemeral Keys**, and **Background Daemonization**.
17
13
 
18
- ### Flow
19
- 1. **Host** starts `ipingyou host` β†’ generates an 8-char UID, spins up `cloudflared` tunnel, and registers with the broker.
20
- 2. **Host** shares the UID with the client.
21
- 3. **Client** runs `ipingyou connect` β†’ enters UID, broker resolves it to tunnel URL β†’ SSH connects via cloudflared proxy.
22
- 4. On `Ctrl+C`, all spawned processes are killed via `tree-kill` and the UID is automatically revoked from the broker.
14
+ No firewalls to configure. No port forwarding. No plaintext leakage.
23
15
 
24
- ## Usage
16
+ ## ✨ God-Tier Features (New in v2.0)
25
17
 
26
- You do not need to clone the repository or configure any `.env` files. `iPingYou` is purely published on npm and handles the backend API automatically!
18
+ * πŸ” **Ephemeral Passwordless Auth**: The Host automatically injects a temporary `Ed25519` key into `authorized_keys`. Clients connect instantly without knowing the machine's actual root/user password. Keys are purged immediately on exit.
19
+ * πŸ’¬ **E2E Web Crypto Chat Room**: A real-time, browser-based chat UI using native Web Crypto API (`AES-GCM`). Your chat keys are passed via URL fragments (`#password`) so they never touch a serverβ€”not even the Host machine's Node server!
20
+ * πŸ“Ί **Terminal Mirroring**: Wrap client SSH sessions in a multiplexed `tmux` terminal. The Host can spectate connected clients in real-time right from the dashboard to audit or assist.
21
+ * πŸ”„ **Reverse Port Forwarding (`ssh -R`)**: Clients can expose their *local* `localhost` development ports back to the Host through the secure tunnel.
22
+ * πŸ“‘ **Hardware Telemetry Verification**: Clients silently generate hardware footprint reports (OS, RAM, CPU, IP), encrypt them locally with the session password, and send them to the Host for authorization.
23
+ * 🚨 **Panic Kill-Switch**: Type `ipingyou panic` to instantly vaporize all associated keys, wipe all alias configs, and send a `SIGKILL` to every active tunnel and SSH shell.
24
+ * πŸ‘» **Daemonization**: Run `ipingyou service install` to quietly install and run the Host listener in the background (survives system reboots using PM2).
27
25
 
28
- ### The "On-the-Fly" Way (Recommended)
29
- Run it anywhere using `npx` (make sure you aren't inside the project source code folder):
26
+ ---
27
+
28
+ ## πŸš€ Quick Start
29
+
30
+ You don't need to download any code. `iPingYou` runs natively from the global npm registry.
30
31
 
32
+ ### The "On-the-Fly" Way (Recommended)
31
33
  ```bash
32
34
  # Start the interactive wizard
33
35
  npx @miraj181/ipingyou
34
36
 
35
- # Or instantly start as a Host
37
+ # Instantly spin up your machine as a Host
36
38
  npx @miraj181/ipingyou host
37
39
 
38
- # Or instantly connect as a Client
40
+ # Connect to a remote machine using a session UID
39
41
  npx @miraj181/ipingyou connect
40
42
  ```
41
43
 
42
44
  ### Global Install
43
- If you use the tool frequently, install it globally:
44
-
45
45
  ```bash
46
46
  npm install -g @miraj181/ipingyou
47
47
 
48
- # Run as native commands:
48
+ # Execute globally using aliases:
49
49
  ipingyou
50
+ # or
50
51
  securelink
51
52
  ```
52
53
 
53
- ## Prerequisites
54
+ ---
55
+
56
+ ## πŸ”’ Zero-Knowledge Architecture
57
+
58
+ The public broker server exists solely to rendezvous connections. It is fundamentally a **"Dumb Pipe"**.
59
+
60
+ ```mermaid
61
+ graph LR
62
+ H[Host CLI] -->|AES-256-CBC Encrypted Payload| B((Broker Relay))
63
+ B -->|Encrypted Payload| C[Client CLI]
64
+ C -->|Locally Decrypts Password| C
65
+ C -->|Direct Cloudflare SSH| H
66
+ C -->|E2E AES-GCM WebSockets| H
67
+ ```
68
+
69
+ 1. **Host** starts up, spawns `cloudflared` tunnels for SSH and Chat, and generates a random, offline **AES-256 Session Password**.
70
+ 2. **Host** encrypts the tunnel data with the password and sends the *ciphertext* to the Broker alongside a short UID.
71
+ 3. **Client** runs `ipingyou connect`, enters the UID and Password.
72
+ 4. **Client** fetches the ciphertext, decrypts it locally, and connects directly via SSH and WebSockets.
73
+ 5. On `Ctrl+C`, `tree-kill` initiates a graceful shutdown, revokes the UID from the broker, and scrubs `/tmp` memory.
74
+
75
+ ---
76
+
77
+ ## πŸ›  Prerequisites
78
+
79
+ | Tool | Required | Installation Guide |
80
+ |------|----------|--------------------|
81
+ | **Node.js β‰₯18** | βœ… | [nodejs.org](https://nodejs.org) |
82
+ | **`ssh`** | βœ… | Ships native on macOS/Linux. Windows: `winget install Microsoft.OpenSSH.Client` |
83
+ | **`cloudflared`** | βœ… | `brew install cloudflared` or [Download Here](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/) |
84
+ | **`tmux`** | 〰️ | *Optional*. Required on Host machine if you want to use **Terminal Mirroring**. |
85
+
86
+ *(Note: The CLI auto-detects your OS and will attempt to guide you on how to install any missing dependencies!)*
87
+
88
+ ---
54
89
 
55
- | Tool | Required | Install |
56
- |------|----------|---------|
57
- | Node.js β‰₯18 | βœ… | [nodejs.org](https://nodejs.org) |
58
- | `ssh` | βœ… | Ships with macOS/Linux; `winget install Microsoft.OpenSSH.Client` on Windows |
59
- | `cloudflared` | βœ… | `brew install cloudflared` / [download](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/) |
90
+ ## πŸ“– CLI Command Reference
60
91
 
61
- *The CLI auto-detects your OS and will attempt to guide you on how to install missing dependencies!*
92
+ | Command | Description |
93
+ |---------|-------------|
94
+ | `ipingyou` | Interactive CLI dashboard wizard. |
95
+ | `ipingyou host` | Start hosting and exposing your local machine securely. |
96
+ | `ipingyou connect -u <UID>` | Connect directly to a specific UID. |
97
+ | `ipingyou panic` | 🚨 Self-destruct mode. Wipes configs, memory, and kills all processes. |
98
+ | `ipingyou service install` | πŸ‘» Installs Host mode as an always-on background daemon. |
99
+ | `ipingyou service stop` | Stops and removes the background daemon. |
62
100
 
63
- ## Security
101
+ ---
64
102
 
65
- - **Zero-Knowledge Architecture** β€” The broker never sees the plaintext Cloudflare URL. It is strictly used as an encrypted key-value store.
66
- - **AES-256-CBC** β€” Tunnel URLs are encrypted locally before being transmitted to the broker.
67
- - **Random UIDs** β€” 8-char nanoid, not hardware-based. When the session dies, the door is locked forever.
68
- - **Auto-revoke** β€” On `Ctrl+C`, UID is immediately deleted from the broker before exit.
69
- - **No Persistence** β€” Broker uses an in-memory Map only with strict 1-hour TTLs.
103
+ ## πŸ“œ License
70
104
 
71
- ## License
105
+ [MIT License](LICENSE) Β© Sk Mirajul Islam
72
106
 
73
- MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miraj181/ipingyou",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "SecureLink-CLI β€” Secure peer-to-peer remote access via SSH & Cloudflare Tunnels",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -26,11 +26,7 @@ import { detectOS, checkDependencies } from './lib/platform.js';
26
26
  import { installShutdownHandlers, executePanicMode } from './lib/cleanup.js';
27
27
  import { startHostMode } from './modes/host.js';
28
28
  import { startClientMode } from './modes/client.js';
29
- import { execa } from 'execa';
30
- import path from 'node:path';
31
- import { fileURLToPath } from 'node:url';
32
29
 
33
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
34
30
 
35
31
  // ─── ASCII Banner ────────────────────────────────────────────
36
32
  function showBanner() {
@@ -21,7 +21,7 @@ import os from 'node:os';
21
21
  import crypto from 'node:crypto';
22
22
  import { decrypt, encrypt } from '../lib/crypto.js';
23
23
  import { trackPID, untrackPID, addCleanupHook } from '../lib/cleanup.js';
24
- import { createSpinner, sshSpinner, networkSpinner, fileTransferSpinner, showConnectionTrace, animatedSteps, simulateTransferProgress } from '../lib/animations.js';
24
+ import { createSpinner, sshSpinner, networkSpinner, fileTransferSpinner, showConnectionTrace, simulateTransferProgress } from '../lib/animations.js';
25
25
  import { getConfig, saveAlias } from '../lib/config.js';
26
26
  import open from 'open';
27
27
 
@@ -701,7 +701,7 @@ async function performReverseForward(username, hostname, privateKeyPath) {
701
701
  const spinner = createSpinner(`Forwarding Host:${remotePort} βž” Localhost:${localPort}...`, networkSpinner).start();
702
702
 
703
703
  try {
704
- const child = execa('ssh', sshArgs, { stdio: 'pipe' });
704
+ const child = execa('ssh', sshArgs, { stdio: 'inherit' });
705
705
  trackPID(child.pid);
706
706
  spinner.succeed(`Reverse tunnel active! Host can access your app at ${chalk.bold.green('localhost:' + remotePort)}`);
707
707
  console.log(chalk.dim(' Press Ctrl+C to terminate the reverse tunnel.'));
package/src/modes/host.js CHANGED
@@ -24,7 +24,6 @@ import { trackPID, untrackPID, setRevokeOnExit, addCleanupHook } from '../lib/cl
24
24
  import { detectOS } from '../lib/platform.js';
25
25
  import { createSpinner, cryptoSpinner, tunnelSpinner, networkSpinner, typeText } from '../lib/animations.js';
26
26
  import { startChatServer, openLocalChatUI } from '../lib/chat.js';
27
- import open from 'open';
28
27
 
29
28
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
30
29
  let BROKER_URL = process.env.BROKER_URL || 'https://ipingyou.onrender.com';
@@ -157,8 +156,7 @@ async function spawnTunnelSupervised(targetUrl, onUrlGenerated) {
157
156
 
158
157
  // ─── Ephemeral SSH Key Management ────────────────────────────
159
158
  async function generateEphemeralKey() {
160
- const osInfo = detectOS();
161
- const tmpDir = osInfo.isWindows ? process.env.TEMP : '/tmp';
159
+ const tmpDir = os.tmpdir();
162
160
  const keyPath = path.join(tmpDir, `ipingyou_${Date.now()}`);
163
161
 
164
162
  await execa('ssh-keygen', ['-t', 'ed25519', '-C', 'ipingyou-ephemeral', '-f', keyPath, '-N', '']);