Sandboxed commands reach the network only through a local proxy that checks the requested hostname against allowedDomains and deniedDomains. The allow list starts empty, and an entry with no port allows every port. By default the proxy does not inspect TLS. Set a domain list and decide what each permission mode does for other hosts.
Read in this order
- OfficialNetwork domain filtering (Claude Code sandboxing docs)Explains the proxy, host checks, port rules and per mode behavior for unlisted hosts.