Skip to content

add proxy support #10227

Closed
Closed

Description

@mroussamamessabih-1337

Description

Hi team,

when I use opencode behind an enterprise proxy I'm getting this error

(base) PS C:\Users\s494709\AppData\Local\OpenCode> .\opencode-cli.exe
{
  "name": "UnknownError",
  "data": {
    "message": "Error: self signed certificate in certificate chain"
  }
}

Can you please add proxy support?

Plugins

No response

OpenCode version

latest

Steps to reproduce

No response

Screenshot and/or share link

(base) PS C:\Users\s494709\AppData\Local\OpenCode> .\opencode-cli.exe
{
"name": "UnknownError",
"data": {
"message": "Error: self signed certificate in certificate chain"
}
}

Operating System

Windows 11

Terminal

powershell

Activity

  1. github-actions commented on Jan 23, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Jan 27, 2026

    @rekram1-node
    Collaborator
  3. Thesam1798 commented on Jan 27, 2026

    @Thesam1798

    Fix available in PR #10856

    I implemented proxy support in PR #10856.

    My use case: corporate proxy where HTTPS_PROXY is set in the environment.

    Before the fix:

    • Couldn't use opencode at all - all network calls failed
    • Providers couldn't reach their APIs
    • Startup failures (version check, ripgrep download, etc.)

    After the fix:

    • Opencode automatically detects HTTP_PROXY/HTTPS_PROXY variables
    • No additional configuration needed
    • NO_PROXY support for internal hosts
    • Everything works perfectly!

    I'm currently using a locally built version while waiting for the merge. The PR also includes TLS support for proxies with custom/self-signed certificates.

  4. ashenstrata commented on Jan 28, 2026

    @ashenstrata

    I hate how this is solved in the PR but I'd really like to have some working solution. Right now opencode (TUI specifically) does not work well in some network setups (including corporate environments). I'm experiencing painfully slow startup times and failing requests, amongst issues with proxy configuration

  5. presmihaylov commented on Feb 2, 2026

    @presmihaylov

    I'm also waiting on this, I'm running opencode in a sandbox and proxying all secrets (including opencode api key) via a http proxy for security purposes and this breaks my setup. I will deploy the custom version from the open PR in the meantime

  6. github-actions commented on Apr 4, 2026

    @github-actions
    Contributor

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

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions