GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: Support explicit proxy configuration in opencode config · Issue #24981 · anomalyco/opencode

[FEATURE]: Support explicit proxy configuration in opencode config #24981

New issue
Copy link
New issue
Copy link
Open
Open
[FEATURE]: Support explicit proxy configuration in opencode config#24981
Copy link
Assignees
rekram1-node

Description

@zhangmuwuge
zhangmuwuge
opened on Apr 29, 2026
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

OpenCode currently supports proxy configuration through standard environment variables such as HTTPS_PROXY,
HTTP_PROXY, and NO_PROXY. This works for simple terminal usage, but it is hard to scope safely when different
developer tools on the same machine need different proxy routes.

In my setup, OpenCode needs a dedicated proxy entrypoint, while other tools use another proxy. Using global
environment variables affects unrelated tools, and using shell wrapper scripts is awkward for Windows, desktop app,
IDE, and corporate VPN setups.

I would like OpenCode to support explicit proxy configuration in opencode.json / opencode.jsonc, for example:

{
  "$schema": "https://opencode.ai/config.json",
  "network": {
    "proxy": {
      "http": "http://127.0.0.1:7890",
      "https": "http://127.0.0.1:7890",
      "all": "socks5://127.0.0.1:7890",
      "noProxy": ["localhost", "127.0.0.1", "::1"]
    }
  }
}

Expected behavior:

- Keep existing environment variable support.
- Define clear precedence between config-based proxy settings and proxy environment variables.
- Apply the resolved proxy settings consistently to provider requests, plugin installs, MCP/network requests, and
  other OpenCode-managed HTTP clients.
- Show resolved proxy settings in opencode debug config, with credentials redacted.
- Support existing config variable substitution, so credentials can be kept in env vars or files instead of hardcoded.

This would make OpenCode easier to use in enterprise/VPN environments and would avoid relying on global environment
variables or per-shell wrapper scripts.

Related but different issue: #21098 reports a plugin install failure when proxy environment variables are present.
This request is about adding first-class, scoped proxy configuration in OpenCode config.
Reacted by Matthew Kern, Григорий Алексанян, nkabargin2gis, Alberto Camporredondo, Jeff K, chrischarland, erikdemarco, Igor Chakrygin, Zverev Konstantin, askazakov and 1 more

Activity

  1. zhangmuwuge
    added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Apr 29, 2026
  2. github-actions
    assigned
    rekram1-node
    on Apr 29, 2026
  3. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 29, 2026
  4. github-actions commented on Apr 29, 2026

    @github-actions
    github-actionsBot
    on Apr 29, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • [FEATURE]:Add Proxy Configuration (Support Socks Protocol & Blacklist/Whitelist with Wildcards) #18193: Similar feature request for explicit proxy configuration in config (supports Socks protocol & blacklist/whitelist with wildcards) — currently open
    • [FEATURE]: Add proxy setting for server and desktop #10962: Feature request to add proxy setting for server and desktop — closed
    • [FEATURE]: opencode proxy #9736: General opencode proxy feature request — closed
    • Support HTTP_PROXY & HTTPS_PROXY for millions of users who are behind fire walls in some regions and some organizations. #531: Support HTTP_PROXY & HTTPS_PROXY for users behind firewalls — open

    If your request is distinct from these (e.g., scoped specifically to config-file-based proxy with per-tool precedence), please clarify the difference so maintainers can evaluate accordingly.

  5. thdxr
    removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. thdxr
    assigned
    nexxeln
    and unassigned
    rekram1-node
    on May 3, 2026
  7. github-actions commented on Jul 5, 2026

    @github-actions
    github-actionsBot
    on Jul 5, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  8. github-actions
    closed this as not plannedon Jul 5, 2026
  9. erikdemarco commented on Oct 18, 2026

    @erikdemarco
    erikdemarco
    on Oct 18, 2026
    More actions

    No update?

  10. rekram1-node
    assigned
    rekram1-node
    and unassigned
    nexxeln
    on Oct 18, 2026
  11. rekram1-node commented on Oct 18, 2026

    @rekram1-node
    rekram1-node
    on Oct 18, 2026
    Member
    More actions

    not a bad idea, ill take a look

    Reacted by Dante Marshal
  12. rekram1-node
    reopened this on Oct 18, 2026
  13. opencodejr commented on Oct 29, 2026

    @opencodejr
    opencodejrBot
    on Oct 29, 2026
    Contributor
    More actions

    Thanks for the detailed request! To summarize: you'd like proxy settings (http/https/all, including socks5, and noProxy) to be configurable in opencode.json, with clear precedence over the HTTP(S)_PROXY/NO_PROXY environment variables, applied to every outbound request OpenCode makes, and shown with credentials redacted in opencode debug config. That would let you scope a proxy to OpenCode alone instead of setting global env vars or using wrapper scripts.

    Right now OpenCode only reads the standard proxy environment variables (see the network docs), so this is a new feature. Maintainers will consider it.

    Related issues:

    • [Desktop][Windows] webfetch tool does not respect system proxy settings — feature request: add proxy config in settings UI #27892: desktop app on Windows not honoring the system proxy (open; a proposed config setting was discussed there)
    • [FEATURE]: Add HTTP/SOCKS5 proxy support for outbound requests #37036: earlier request for HTTP/SOCKS5 proxy config in opencode.json
    • [FEATURE]:Add Proxy Configuration (Support Socks Protocol & Blacklist/Whitelist with Wildcards) #18193: earlier request for proxy config with socks support and allow/deny lists
    • [FEATURE]:add socks5 proxy #12650, [FEATURE]:Add SOCKS5 Proxy Support in Desktop App #9956: SOCKS5 proxy support
    • Plugin install via npm fails behind proxy with 'fetch() proxy.url must be a non-empty string' #21098: plugin install failing when proxy env vars are set
  14. itsarunkj commented on Oct 29, 2026

    @itsarunkj
    itsarunkj
    on Oct 29, 2026
    More actions

    Looking forward to this @rekram1-node !

  15. neriousy
    marked Add in-app proxy configuration so OpenCode can use its own proxy for network requests #63052 as a duplicate of this issue on Nov 10, 2026
  16. mosinnik commented on Nov 13, 2026

    @mosinnik
    mosinnik
    on Nov 13, 2026
    More actions

    @rekram1-node any news? I need proxy settings

  17. rodi4eg commented on Nov 18, 2026

    @rodi4eg
    rodi4eg
    on Nov 18, 2026
    More actions

    Would be useful to have proxy at the provider level, the way settings.tls already scopes a client certificate to one provider's requests only.

    "providers": {
      "upstream-a": {
        "package": "@opencode/ai/providers/openai-compatible",
        "settings": {
          "baseURL": "https://api.example.com/v1",
          "proxy": "http://127.0.0.1:1080"
        }
      }
    }

    Env vars can't express this. They apply to the whole process, so my own tools, webfetch and remote MCP servers get routed too, and a long-lived serve --service keeps whatever environment it started with. A provider-level proxy (http/https/socks5, winning over env for that provider only, userinfo redacted in opencode debug config) would let one provider use a tunnel while everything else connects directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.