Skip to content

Wildcard subdomains in NO_PROXY are not respected #10710

@ashenstrata

Description

@ashenstrata

Description

I'm using a proxy with opencode TUI. I want to exclude all subdomains of a certain domain from going through it. I'm doing this by adding *.example.com to $NO_PROXY. However, opencode is still routing calls to a provider on foo.bar.example.com through the proxy. Only if I specify the full domain foo.bar.example.com does it function correctly.

Here's a representation of my setup:

export GATEWAY_PROXY="http://gateway.local:2080"
export NO_PROXY="localhost,127.0.0.1,192.168.*,*.local,*.example.com"

HTTP_PROXY=$GATEWAY_PROXY HTTPS_PROXY=$GATEWAY_PROXY opencode
{
  "$schema": "https://opencode.ai/config.json",
  "autoupdate": "notify",
  "share": "disabled",
  "provider": {
    "ozon": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "foo",
      "options": {
        "baseURL": "https://foo.bar.example.com/api",
        "apiKey": "foo"
      },
      "models": {}
    }
  }
}

Plugins

none

OpenCode version

1.1.36

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 26.2

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions