Skip to content

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

Open
bj456736 wants to merge 1 commit into
MoonshotAI:mainfrom
bj456736:feat/lan-remote-control
Open

feat(vis): show LAN URLs when binding to 0.0.0.0 for remote control#1134
bj456736 wants to merge 1 commit 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

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 (no regression)

Example output:

[vis-server] listening on http://0.0.0.0:3001 (auth=required, KIMI_CODE_HOME=/root/.kimi-code)
[vis-server] LAN access:
  - http://10.210.62.129:3001/

@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 251148d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 26, 2026

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

commit: 251148d

@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: b46afed1d6

ℹ️ 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".

for (const [, ifaceList] of Object.entries(os.networkInterfaces())) {
for (const iface of ifaceList ?? []) {
if (!iface.internal && iface.family === 'IPv4') {
addresses.push(`http://${iface.address}:${port}/`);

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 auth tokens in printed LAN URLs

For any --host 0.0.0.0/VIS_HOST=0.0.0.0 non-loopback launch, resolveVisAuthToken() requires auth and the web client only learns that token from ?token/#token or localStorage (apps/vis/web/src/api.ts). These newly printed LAN URLs are bare origins, so a phone or other fresh browser can load the shell but every /api/* call is rejected with 401 by the bearer middleware; include the token fragment or another auth handoff when authToken is set.

Useful? React with 👍 / 👎.

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
@bj456736 bj456736 force-pushed the feat/lan-remote-control branch from b46afed to 251148d Compare June 27, 2026 10:02
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