Answer: You restrict allowed domains by editing the ALLOWED_DOMAINS array in the proxy script, which is set to ['example.com', 'googleapis.com'], and connections are only allowed on port 443. Status: Confirmed Entry: tool/gemini-cli/permissions-and-security/proxy-allowed-domains Revision: 1 Digest: sha256:4d5edce105120929 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:18Z Last changed: 2026-11-13T03:18:18Z Last verified: 2026-11-20T12:52:34Z Next check: 2026-11-21T12:52:34Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of allowed domains | ['example.com', 'googleapis.com'] | [1] | 2026-11-20 allowed port | 443 | [1] | 2026-11-20 proxy port | 8877 | [1] | 2026-11-20 environment variable | GEMINI_SANDBOX_PROXY_COMMAND | [1] | 2026-11-20 Sources: [1] Google. "Example proxy script". https://geminicli.com/docs/examples/proxy-script.md Role: primary. Accessed: 2026-11-20T12:52:34Z Quote: "const ALLOWED_DOMAINS = ['example.com', 'googleapis.com'];" (Supports: allowed domains) Quote: "const ALLOWED_PORT = '443';" (Supports: allowed port) Quote: "const PROXY_PORT = 8877;" (Supports: proxy port) Quote: "`GEMINI_SANDBOX_PROXY_COMMAND` environment variable" (Supports: environment variable) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 7d0b26c540e3984882e7c4781018ad0416ee366b0be60e7bd6f6c08ae5dedba3 (captured 2026-11-13T03:18:18Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:18Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:52:34Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:52:34Z Last attempt: 2026-11-20T12:52:34Z Notes and limitations: Extracted automatically from a single official source (section "Example proxy script"). Related: https://latestn.com/tool/gemini-cli/permissions-and-security/remote-subagent-authentication How do I configure authentication for a remote subagent in Gemini CLI? https://latestn.com/tool/gemini-cli/permissions-and-security/restrict-tool-access How do I restrict which tools Gemini CLI users can access? https://latestn.com/tool/gemini-cli/permissions-and-security/rule-matching-priority How does Gemini CLI match policy rules and resolve conflicts using priority tiers? https://latestn.com/tool/gemini-cli/permissions-and-security/mcp-oauth-authentication How do I set up OAuth authentication for a remote MCP server in Gemini CLI? https://latestn.com/tool/gemini-cli/permissions-and-security/plan-mode-tool-restrictions What tools are restricted in Gemini CLI Plan Mode? https://latestn.com/tool/gemini-cli/permissions-and-security/plan-mode-yolo-availability Is Gemini CLI's enter_plan_mode tool available in YOLO mode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:18Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/permissions-and-security/proxy-allowed-domains/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/permissions-and-security/proxy-allowed-domains POST: https://latestn.com/dispute/tool/gemini-cli/permissions-and-security/proxy-allowed-domains with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/permissions-and-security/proxy-allowed-domains?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I restrict which domains the Gemini CLI sandbox proxy allows? Revision 1, last verified 2026-11-20T12:52:34Z. https://latestn.com/tool/gemini-cli/permissions-and-security/proxy-allowed-domains (accessed 2026-11-21T09:58:50Z). @misc{LatestN_tool_gemini_cli_permissions_and_security_proxy_allowed_domains_r1, title = {How do I restrict which domains the Gemini CLI sandbox proxy allows?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/permissions-and-security/proxy-allowed-domains}}, note = {Revision 1; digest sha256:4d5edce105120929; last verified 2026-11-20T12:52:34Z; accessed 2026-11-21T09:58:50Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/permissions-and-security/proxy-allowed-domains