iframer-cli 2.0.1 → 2.1.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.
Files changed (3) hide show
  1. package/cli.js +24 -0
  2. package/mcp-server.cjs +605 -382
  3. package/package.json +1 -1
package/cli.js CHANGED
@@ -516,6 +516,29 @@ async function main() {
516
516
 
517
517
  // ─── Install MCP ──────────────────────────────────────────────
518
518
 
519
+ case "proxy": {
520
+ const action = args[0];
521
+ if (!action || !["start", "stop", "status"].includes(action)) {
522
+ console.log(" Usage: iframer proxy <start|stop|status>");
523
+ break;
524
+ }
525
+ if (action === "status") {
526
+ const res = await fetch(`${getServer()}/proxy`);
527
+ const data = await res.json();
528
+ console.log(JSON.stringify(data, null, 2));
529
+ } else {
530
+ const server = action === "start" ? args[1] || null : null;
531
+ const res = await fetch(`${getServer()}/proxy`, {
532
+ method: "POST",
533
+ headers: { "Content-Type": "application/json" },
534
+ body: JSON.stringify({ server }),
535
+ });
536
+ const data = await res.json();
537
+ console.log(JSON.stringify(data, null, 2));
538
+ }
539
+ break;
540
+ }
541
+
519
542
  case "install-mcp": {
520
543
  const mcpServerPath = path.join(__dirname, "mcp-server.cjs");
521
544
  if (!fs.existsSync(mcpServerPath)) {
@@ -553,6 +576,7 @@ async function main() {
553
576
  logout Remove saved credentials
554
577
  status Show current auth status
555
578
  install-mcp Install the iframer MCP into Claude Code
579
+ proxy <start|stop|status> Control the home proxy (routes browser through your IP)
556
580
 
557
581
  Credentials:
558
582
  credentials add <domain> Store login credentials (encrypted, server-side)