Skip to content

feat(cli/server): hint --host 0.0.0.0 when bound to loopback - #1264

Draft
RemiliaForever (RemiliaForever) wants to merge 1 commit into
mainfrom
fix/1295-serve-loopback-hint
Draft

feat(cli/server): hint --host 0.0.0.0 when bound to loopback#1264
RemiliaForever (RemiliaForever) wants to merge 1 commit into
mainfrom
fix/1295-serve-loopback-hint

Conversation

@RemiliaForever

Copy link
Copy Markdown
Contributor

Pull Request

Description

One of the four UX items from the customer feedback report in #1295, split out from #1255. Output-side only; no SDK changes.

  • serve prints a hint line when bound to a loopback address (127.0.0.0/8, localhost, ::1), pointing users at --host 0.0.0.0:<port> to expose the server on the LAN.
  • Non-loopback binds (0.0.0.0, [::], an explicit LAN IP) print nothing extra.
  • Malformed hosts are treated as non-loopback — better silent than misleading.
  • Replaces the placeholder package_test.go with server_test.go covering hostBindingHint.

Related Issue

Refs qualcomm/GenieX#1295 (item 5). Split out from #1255.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Context

Verified manually on Windows ARM64 (Snapdragon X Elite): default bind printed the hint; --host 0.0.0.0:18181 printed no hint; [::1]:18181 printed the hint.

serve prints a hint line when bound to a loopback address (127.0.0.0/8,
localhost, ::1), pointing users at --host 0.0.0.0:<port> to expose the
server on the LAN. Non-loopback binds print nothing extra; malformed
hosts are treated as non-loopback. Replaces the placeholder
package_test.go with server_test.go covering hostBindingHint.

Refs qualcomm/GenieX#1295 (item 5).

Signed-off-by: RemiliaForever <remilia@koumakan.cc>
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