uplink-cli 0.1.0-alpha.2 → 0.1.0-alpha.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.
@@ -652,6 +652,43 @@ export const menuCommand = new Command("menu")
652
652
  }
653
653
  },
654
654
  },
655
+ {
656
+ label: "View Connected (with IPs)",
657
+ action: async () => {
658
+ try {
659
+ // Use the API endpoint which proxies to the relay
660
+ const data = await apiRequest("GET", "/v1/admin/relay-status") as {
661
+ connectedTunnels?: number;
662
+ tunnels?: Array<{ token: string; clientIp: string; targetPort: number; connectedAt: string; connectedFor: string }>;
663
+ timestamp?: string;
664
+ error?: string;
665
+ message?: string;
666
+ };
667
+
668
+ if (data.error) {
669
+ return `❌ Relay error: ${data.error}${data.message ? ` - ${data.message}` : ""}`;
670
+ }
671
+
672
+ if (!data.tunnels || data.tunnels.length === 0) {
673
+ return "No tunnels currently connected to the relay.";
674
+ }
675
+
676
+ const lines = data.tunnels.map((t) =>
677
+ `${truncate(t.token, 12).padEnd(14)} ${t.clientIp.padEnd(16)} ${String(t.targetPort).padEnd(6)} ${t.connectedFor.padEnd(10)} ${truncate(t.connectedAt, 19)}`
678
+ );
679
+
680
+ return [
681
+ `Connected Tunnels: ${data.connectedTunnels}`,
682
+ "",
683
+ "Token Client IP Port Uptime Connected At",
684
+ "-".repeat(75),
685
+ ...lines,
686
+ ].join("\n");
687
+ } catch (err: any) {
688
+ return `❌ Failed to get relay status: ${err.message}`;
689
+ }
690
+ },
691
+ },
655
692
  ],
656
693
  });
657
694
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uplink-cli",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Localhost to public URL in seconds. No signup forms, no browser - everything in your terminal.",
5
5
  "keywords": [
6
6
  "tunnel",