@miraj181/ipingyou 1.0.0 → 1.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/package.json +1 -5
- package/src/cli.js +0 -33
- package/src/modes/client.js +1 -1
- package/src/modes/host.js +1 -2
- package/src/server.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraj181/ipingyou",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "SecureLink-CLI — Secure peer-to-peer remote access via SSH & Cloudflare Tunnels",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"start": "node src/cli.js",
|
|
17
|
-
"broker": "node src/server.js",
|
|
18
|
-
"dev:broker": "nodemon src/server.js",
|
|
19
17
|
"dev:cli": "node src/cli.js",
|
|
20
18
|
"prepublishOnly": "node -e \"require('fs').accessSync('LICENSE')\" && node src/cli.js --help"
|
|
21
19
|
},
|
|
@@ -44,9 +42,7 @@
|
|
|
44
42
|
"dependencies": {
|
|
45
43
|
"chalk": "^5.3.0",
|
|
46
44
|
"commander": "^12.1.0",
|
|
47
|
-
"dotenv": "^16.4.5",
|
|
48
45
|
"execa": "^9.5.2",
|
|
49
|
-
"express": "^4.21.0",
|
|
50
46
|
"inquirer": "^12.3.2",
|
|
51
47
|
"nanoid": "^5.0.9",
|
|
52
48
|
"ora": "^8.1.1",
|
package/src/cli.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* npx ipingyou — Interactive mode
|
|
12
12
|
* npx ipingyou host — Start as host directly
|
|
13
13
|
* npx ipingyou connect — Start as client directly
|
|
14
|
-
* npx ipingyou broker — Start the central broker
|
|
15
14
|
*
|
|
16
15
|
* Security:
|
|
17
16
|
* All tunnel URLs are AES-256-CBC encrypted on the CLI side.
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
* ============================================================
|
|
20
19
|
*/
|
|
21
20
|
|
|
22
|
-
import 'dotenv/config';
|
|
23
21
|
import { Command } from 'commander';
|
|
24
22
|
import inquirer from 'inquirer';
|
|
25
23
|
import chalk from 'chalk';
|
|
@@ -61,7 +59,6 @@ function showRichHelp() {
|
|
|
61
59
|
console.log(` ${chalk.green('host')} : Generates a secure session UID and exposes your local machine.`);
|
|
62
60
|
console.log(` ${chalk.blue('connect')} : Prompts for a UID to connect to a remote host.`);
|
|
63
61
|
console.log(` ${chalk.dim('Supports Interactive SSH Shell & SCP File Transfers')}`);
|
|
64
|
-
console.log(` ${chalk.yellow('broker')} : Start your own relay server (for self-hosting).`);
|
|
65
62
|
console.log('');
|
|
66
63
|
|
|
67
64
|
console.log(chalk.bold.white(' 🔒 Security Architecture:'));
|
|
@@ -74,7 +71,6 @@ function showRichHelp() {
|
|
|
74
71
|
console.log(` $ npx ipingyou ${chalk.dim('# Interactive wizard (Recommended)')}`);
|
|
75
72
|
console.log(` $ npx ipingyou host ${chalk.dim('# Quick start as Host')}`);
|
|
76
73
|
console.log(` $ npx ipingyou connect ${chalk.dim('# Quick start as Client')}`);
|
|
77
|
-
console.log(` $ npx ipingyou broker ${chalk.dim('# Start Relay')}`);
|
|
78
74
|
console.log('');
|
|
79
75
|
}
|
|
80
76
|
|
|
@@ -134,10 +130,6 @@ async function interactiveMode() {
|
|
|
134
130
|
value: 'client',
|
|
135
131
|
},
|
|
136
132
|
new inquirer.Separator(),
|
|
137
|
-
{
|
|
138
|
-
name: `${chalk.yellow('📡 Start Broker Server')} ${chalk.dim('— Run the central relay (for self-hosting)')}`,
|
|
139
|
-
value: 'broker',
|
|
140
|
-
},
|
|
141
133
|
{
|
|
142
134
|
name: `${chalk.magenta('📖 Help / Information')} ${chalk.dim('— Learn how iPingYou works')}`,
|
|
143
135
|
value: 'help',
|
|
@@ -153,23 +145,12 @@ async function interactiveMode() {
|
|
|
153
145
|
case 'client':
|
|
154
146
|
await startClientMode();
|
|
155
147
|
break;
|
|
156
|
-
case 'broker':
|
|
157
|
-
await startBroker();
|
|
158
|
-
break;
|
|
159
148
|
case 'help':
|
|
160
149
|
showRichHelp();
|
|
161
150
|
break;
|
|
162
151
|
}
|
|
163
152
|
}
|
|
164
153
|
|
|
165
|
-
// ─── Broker Start ────────────────────────────────────────────
|
|
166
|
-
async function startBroker() {
|
|
167
|
-
console.log(chalk.cyan(' Starting broker server...'));
|
|
168
|
-
console.log('');
|
|
169
|
-
// Dynamically import the server (it self-starts on import)
|
|
170
|
-
await import('./server.js');
|
|
171
|
-
}
|
|
172
|
-
|
|
173
154
|
// ─── Commander Setup ─────────────────────────────────────────
|
|
174
155
|
const program = new Command();
|
|
175
156
|
|
|
@@ -214,20 +195,6 @@ program
|
|
|
214
195
|
}
|
|
215
196
|
});
|
|
216
197
|
|
|
217
|
-
program
|
|
218
|
-
.command('broker')
|
|
219
|
-
.description('Start the central broker server')
|
|
220
|
-
.option('-p, --port <port>', 'Port to listen on', '4000')
|
|
221
|
-
.action(async (opts) => {
|
|
222
|
-
try {
|
|
223
|
-
if (opts.port) process.env.BROKER_PORT = opts.port;
|
|
224
|
-
showBanner();
|
|
225
|
-
await startBroker();
|
|
226
|
-
} catch (err) {
|
|
227
|
-
fatal('broker', err);
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
|
|
231
198
|
// ─── Default: interactive mode ──────────────────────────────
|
|
232
199
|
program.action(async () => {
|
|
233
200
|
try {
|
package/src/modes/client.js
CHANGED
|
@@ -19,7 +19,7 @@ import { decrypt } from '../lib/crypto.js';
|
|
|
19
19
|
import { trackPID, untrackPID } from '../lib/cleanup.js';
|
|
20
20
|
import { createSpinner, sshSpinner, networkSpinner, fileTransferSpinner, showConnectionTrace, animatedSteps, simulateTransferProgress } from '../lib/animations.js';
|
|
21
21
|
|
|
22
|
-
const BROKER_URL = process.env.BROKER_URL || '
|
|
22
|
+
const BROKER_URL = process.env.BROKER_URL || 'https://ipingyou.onrender.com';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Resolve a UID to a tunnel URL via the broker.
|
package/src/modes/host.js
CHANGED
|
@@ -22,7 +22,7 @@ import { trackPID, untrackPID, setRevokeOnExit } from '../lib/cleanup.js';
|
|
|
22
22
|
import { detectOS } from '../lib/platform.js';
|
|
23
23
|
import { createSpinner, cryptoSpinner, tunnelSpinner, networkSpinner, typeText } from '../lib/animations.js';
|
|
24
24
|
|
|
25
|
-
const BROKER_URL = process.env.BROKER_URL || '
|
|
25
|
+
const BROKER_URL = process.env.BROKER_URL || 'https://ipingyou.onrender.com';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Ensure the local SSH server is running.
|
|
@@ -307,7 +307,6 @@ export async function startHostMode() {
|
|
|
307
307
|
const registered = await registerWithBroker(uid, tunnel.url);
|
|
308
308
|
if (!registered) {
|
|
309
309
|
console.error(chalk.red(`\n ❌ FATAL: Could not register with broker at ${BROKER_URL}`));
|
|
310
|
-
console.log(chalk.dim(' Is the broker running? Try: npx ipingyou broker'));
|
|
311
310
|
process.exit(1);
|
|
312
311
|
}
|
|
313
312
|
|