Skip to content

Add configurable daemon HTTP bind address (--bind / config bind)#103

Merged
albertwoo merged 4 commits into
mainfrom
copilot/fix-daemon-binding-to-0000
May 31, 2026
Merged

Add configurable daemon HTTP bind address (--bind / config bind)#103
albertwoo merged 4 commits into
mainfrom
copilot/fix-daemon-binding-to-0000

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

The daemon HTTP listener was effectively locked to loopback (127.0.0.1), which prevented running it on 0.0.0.0 or other explicit interfaces. This change makes bind address configurable at runtime and in config, while preserving loopback as the default.

  • CLI + config surface

    • Added --bind <addr> to oly daemon start.
    • Extended config overrides with bind (default remains 127.0.0.1).
    • Plumbed runtime overrides through daemon startup path.
  • HTTP server binding behavior

    • Replaced hardcoded 127.0.0.1 socket construction with parsed http_bind + http_port.
    • Listener startup logs now render the effective URL from configured bind/port.
    • Detached start path now forwards bind override to internal foreground process.
  • Daemon status/summary output

    • Detached/status HTTP summary now reports the configured bind address instead of always showing loopback.
    • URL formatting handles IPv4/IPv6 correctly.
  • E2E and supporting test utilities

    • Added start_daemon_http_with_bind(...) in shared e2e helpers.
    • Added e2e coverage proving --bind 0.0.0.0 starts successfully and serves HTTP requests.
  • Docs alignment

    • Updated CLI usage/docs to include --bind.
    • Updated HTTP behavior/spec text to reflect configurable bind address.
# New runtime behavior
oly daemon start --bind 0.0.0.0 --port 15443

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix daemon binding to allow 0.0.0.0 Add configurable daemon HTTP bind address (--bind / config bind) May 31, 2026
Copilot AI requested a review from albertwoo May 31, 2026 02:51
@albertwoo albertwoo marked this pull request as ready for review May 31, 2026 03:00

@albertwoo albertwoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move the duplicate fn format_http_url to src\utils.rs.

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Move the duplicate fn format_http_url to src\utils.rs.

Done in e62280c. I moved format_http_url into src/utils.rs and updated both call sites (src/http/mod.rs and src/daemon/lifecycle.rs) to use the shared helper.

Copilot AI requested a review from albertwoo May 31, 2026 07:42
@albertwoo albertwoo merged commit 7fc20e0 into main May 31, 2026
3 checks passed
@albertwoo albertwoo deleted the copilot/fix-daemon-binding-to-0000 branch May 31, 2026 11:27
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.

can't make deamon binding to 0.0.0.0

2 participants