feat: add --enable-host-access flag and fix CONNECT to port 80#190
Merged
feat: add --enable-host-access flag and fix CONNECT to port 80#190
Conversation
This PR addresses issue #189 by: 1. Making host.docker.internal opt-in via --enable-host-access flag - By default, containers cannot resolve host.docker.internal - When enabled, adds extra_hosts to both Squid and agent containers - Shows security warning when combined with host.docker.internal domain 2. Allowing CONNECT method to Safe_ports (80 and 443) - Changes `http_access deny CONNECT !SSL_ports` to `!Safe_ports` - Required because Node.js fetch uses CONNECT for HTTP through proxy - Domain ACLs remain the primary security control Security considerations: - Host access is opt-in to prevent accidental exposure of host services - Warning displayed when host.docker.internal is in allowed domains - Safe_ports change has minimal security impact as domain filtering is primary control Closes #189 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
Test Coverage Report
Coverage ThresholdsThe project has the following coverage thresholds configured:
Coverage report generated by `npm run test:coverage` |
|
Smoke Test Results (Run #20760004554) ✅ GitHub MCP: Reviewed PRs #186, #185 Status: PASS
|
|
Smoke Test Results:
Status: FAIL
|
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.
Summary
This PR addresses issue #189 by:
Making
host.docker.internalopt-in via--enable-host-accessflaghost.docker.internalextra_hoststo both Squid and agent containershost.docker.internaldomainAllowing CONNECT method to Safe_ports (80 and 443)
http_access deny CONNECT !SSL_portsto!Safe_portsSecurity Considerations
host.docker.internalis in allowed domainsUsage
# Enable access to services running on the host via host.docker.internal sudo awf \ --enable-host-access \ --allow-domains host.docker.internal \ -- curl http://host.docker.internal:8080Test Plan
--enable-host-accessflag behaviordocs/usage.mdCloses #189
🤖 Generated with Claude Code