fix: use platform-aware bind address for host agent HTTP server#846
Open
yasinBursali wants to merge 1 commit intoLight-Heart-Labs:mainfrom
Open
fix: use platform-aware bind address for host agent HTTP server#846yasinBursali wants to merge 1 commit intoLight-Heart-Labs:mainfrom
yasinBursali wants to merge 1 commit intoLight-Heart-Labs:mainfrom
Conversation
macOS/Windows default to 127.0.0.1 (Docker Desktop routes host.docker.internal to loopback). Linux keeps 0.0.0.0 for backward compatibility since host.docker.internal resolves to the Docker bridge gateway. DREAM_AGENT_BIND env var allows explicit override on any platform. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Change host agent bind address from hardcoded
0.0.0.0to a platform-aware default withDREAM_AGENT_BINDenv var override.Why
The host agent has a Docker control API (start/stop containers, execute setup hooks, read logs). Binding to
0.0.0.0exposes it to the entire LAN. On macOS/Windows, Docker Desktop routeshost.docker.internalthrough the VM to the host's loopback, so127.0.0.1is sufficient. The/healthendpoint responds without authentication.How
127.0.0.1on macOS (Darwin) / Windows,0.0.0.0on LinuxDREAM_AGENT_BINDenv var overrides the default on any platform0.0.0.0with guidance to restrictDREAM_AGENT_BINDto.env.schema.jsonTesting
0.0.0.0is required for Linux (host.docker.internal resolves to Docker bridge gateway 172.17.0.1, not loopback)127.0.0.1bind → container connection refused;0.0.0.0→ worksPlatform Impact
127.0.0.1, no longer LAN-exposed127.0.0.10.0.0.0(required for container connectivity via Docker bridge)platform.system()returns "Linux", gets0.0.0.0(correct — WSL2 uses Docker bridge like Linux)Known Limitations
0.0.0.0— a follow-up could detect the Docker bridge IP for tighter bindingDREAM_AGENT_BINDenv var provides escape hatch for all platformsReview