[PR #9039] fix: mdns discover hostname #12959

Closed
opened 2026-02-16 18:17:50 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9039

State: closed
Merged: Yes


Fix: #9040

What does this PR do?

  1. Adds explicit hostname to mDNS publication - Sets host: "opencode.local" when publishing the mDNS service,
    ensuring the service is advertised with the correct discoverable hostname.
  2. Simplifies the MDNS.publish API - Moves the service name generation (opencode-${port}) inside the function,
    removing the optional name parameter since it was always being overridden by the caller anyway.
  3. Fixes CLI display - Updates the mDNS info message to show the full address including the port
    (opencode.local:${server.port}) instead of just opencode.local.

How did you verify your code works?

  • Running the web server with mDNS enabled (--mdns flag)
  • Using dns-sd -B _http._tcp to verify the service is advertised with
    opencode.local as the hostname
  • Confirming the service is discoverable and resolves correctly on the local network
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9039 **State:** closed **Merged:** Yes --- Fix: #9040 ### What does this PR do? 1. Adds explicit hostname to mDNS publication - Sets host: "opencode.local" when publishing the mDNS service, ensuring the service is advertised with the correct discoverable hostname. 2. Simplifies the MDNS.publish API - Moves the service name generation (opencode-${port}) inside the function, removing the optional name parameter since it was always being overridden by the caller anyway. 3. Fixes CLI display - Updates the mDNS info message to show the full address including the port (opencode.local:${server.port}) instead of just opencode.local. ### How did you verify your code works? - Running the web server with mDNS enabled (--mdns flag) - Using dns-sd -B _http._tcp to verify the service is advertised with opencode.local as the hostname - Confirming the service is discoverable and resolves correctly on the local network
yindo added the pull-request label 2026-02-16 18:17:50 -05:00
yindo closed this issue 2026-02-16 18:17:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12959