feat(agents): configure Claude Desktop egress hosts - #145
Open
henrikbroselid wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <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.
Summary
coworkEgressAllowedHostsfor Claude Desktop 3P profiles with an explicit, non-wildcard default allowlist*,localhost,host[:port], and*.host[:port]forms in both the UI and Rust backendWhy
EasyCLIProxyAPI originally generated
coworkEgressAllowedHosts: ["*"], then removed the field to avoid an unrestricted default. Omitting it also prevents sandboxed tools from reaching anything beyond the inference endpoint, so package installs, shell network access, and web fetches fail unless the profile is edited manually.This change keeps the safer intent without disabling useful egress. New profiles use these explicit defaults:
localhost127.0.0.1api.anthropic.comgithub.com*.github.com*.githubusercontent.comgitlab.com*.gitlab.comA bare
*is still accepted for compatibility, but the UI warns that it disables the network sandbox restriction. Existing valid profile values take precedence when an older caller omits the new option, and the current profile is loaded back into the UI so machine-specific additions survive reapplication.Implementation notes
1..=65535; valid entries are trimmed, lowercased, and deduplicated in stable order.Tests
bun test— 147 passedbun run checkbun run buildcargo fmt --checkcargo clippy --all-targets -- -D warningscargo test -q claude_desktop_— 13 passedcargo test -q -- --skip agent_probe_command_stops_at_timeout— 236 passed; the existing Unix timeout test was skipped because itssh -c "sleep 5"child retains the captured pipes in the Linux Docker test environment and consistently trips the unrelated 3-second wall-clock assertion🤖 Generated with Claude Code