Skip to content

feat(vis): show LAN URLs when binding to 0.0.0.0 for remote control#2103

Open
bj456736 wants to merge 2 commits into
MoonshotAI:mainfrom
bj456736:feat/lan-remote-control
Open

feat(vis): show LAN URLs when binding to 0.0.0.0 for remote control#2103
bj456736 wants to merge 2 commits into
MoonshotAI:mainfrom
bj456736:feat/lan-remote-control

Conversation

@bj456736

Copy link
Copy Markdown
Contributor

When vis-server binds to 0.0.0.0 or :: (all interfaces), the startup banner and CLI output now display the actual LAN IP addresses that other devices on the same network can use to connect. This enables lan-range remote control from phones, tablets, or other machines.

Changes

  • Add isAllInterfaces() and getLocalNetworkAddresses() to config.ts
  • Add lanUrls field to StartedVisServer in start.ts
  • Update formatStartupBanner() to list LAN URLs when applicable
  • Update vis CLI handler to print LAN access URLs

Testing

Closes the "web:局域网范围的remote control" task.

qer added 2 commits July 23, 2026 18:03
When vis-server binds to 0.0.0.0 or :: (all interfaces), the startup
banner and CLI output now display the actual LAN IP addresses that
other devices on the same network can use to connect. This enables
lan-range remote control from phones, tablets, or other machines.

Changes:
- Add isAllInterfaces() and getLocalNetworkAddresses() to config.ts
- Add lanUrls field to StartedVisServer in start.ts
- Update formatStartupBanner() to list LAN URLs when applicable
- Update vis CLI handler to print LAN access URLs

Tested:
- 0.0.0.0 binding shows LAN URL (e.g. http://10.210.62.129:3001/)
- 127.0.0.1 binding does not show LAN URLs
@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bf28c1b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@bf28c1b
npx https://pkg.pr.new/@moonshot-ai/kimi-code@bf28c1b

commit: bf28c1b

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf28c1b804

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (options.lanUrls !== undefined && options.lanUrls.length > 0) {
banner +=
`[vis-server] LAN access:\n` +
options.lanUrls.map((url) => ` - ${url}`).join('\n') +

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the auth token in LAN links

When vis is bound to 0.0.0.0 or ::, the server normally has VIS_AUTH_TOKEN set because non-loopback binds are rejected without it; however these new LAN URLs are printed as bare origins. A browser on another device has no kimi-vis-auth-token in localStorage and the SPA only sends Authorization after it reads token/vis_token from the URL, so opening the advertised LAN link loads the shell but every /api/* request returns 401. Add the token fragment/query to these printed links, or otherwise print a usable authenticated URL.

Useful? React with 👍 / 👎.

@@ -0,0 +1,8 @@
---
"@moonshot-ai/kimi-server": patch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point the changeset at an existing package

This changeset names @moonshot-ai/kimi-server, but there is no workspace package with that name in the repo; the changed CLI package is @moonshot-ai/kimi-code, while @moonshot-ai/vis-server is private and ignored by changesets. As written, the release workflow cannot apply the user-visible kimi vis changelog/bump to the published CLI package and may fail when processing the unknown package name.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant