Skip to content

Leaflow Code (Web IDE)

Leaflow Code (https://ide.leaflow.cn) is a standalone browser-based VS Code workspace connected directly to any machine enrolled in Fleet Workbench. Start coding immediately without installing local IDEs or setting up public reverse proxies for test ports.

How Zero-Config Private Port Preview Works

Section titled “How Zero-Config Private Port Preview Works”

When you launch a dev server inside the integrated terminal, your browser reaches 127.0.0.1:<port> on the remote host directly over your end-to-end encrypted session—without opening public firewall ports:

flowchart LR
  Browser["Developer Browser\nide.leaflow.cn"]
  Preview["Isolated Preview Tab\nhttps://<port>-<proj>-<host>.ide.leaflow.cn"]
  Tunnel["End-to-End Encrypted Channel"]
  Local["Remote Host Loopback\n127.0.0.1:<port>"]

  Browser --> Tunnel --> Local
  Preview -. Reuses active channel (<10ms) .-> Tunnel
Feature Details
Automatic Port Detection Running npm run dev, python3 -m http.server 8080, etc. in the terminal automatically prompts a preview button
Manual Port Entry Open the Ports panel or click the remote status bar to preview any port number manually
Full Modern Web Support Handles root-relative assets, fetch/XHR API calls, 302 redirects, and WebSocket HMR (Vite / Next.js Fast Refresh)
Live sudo Approval Bar Privileged commands run in the terminal display a top floating card without stealing editor focus
Workspace Persistence Switching folders (File -> Open Folder) refreshes only the workbench while keeping the underlying host connection alive
  1. Confirm your target host shows Online in Fleet Workbench.
  2. Click Open in Leaflow Code from Fleet, or open ide.leaflow.cn directly and select your space and host.
  3. Open your project folder via File -> Open Folder.
  4. Start your dev server in the integrated terminal and click the port preview prompt to view it live in a new tab.