[PR #6025] feat: add per-provider TLS and proxy configuration #11703

Open
opened 2026-02-16 18:16:38 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6025

State: open
Merged: No


Add support for configuring TLS options and HTTP proxy per provider, enabling use of corporate proxies, self-signed certificates, and mTLS.

New provider options:

  • tls.rejectUnauthorized: Accept self-signed certificates
  • tls.cert: Client certificate path for mTLS
  • tls.key: Client private key path for mTLS
  • tls.ca: Custom CA certificate path(s)
  • proxy: HTTP proxy URL (overrides HTTPS_PROXY env var)

The TLS config is passed to Bun's native fetch using Bun.file() for cert/key/ca paths. The proxy option uses Bun's built-in proxy support.

For system-wide certificate trust, users can set:

  • NODE_OPTIONS="--use-system-ca" or BUN_OPTIONS="--use-system-ca"
  • NODE_EXTRA_CA_CERTS=/path/to/ca.pem

Documenting this resolves #1694 - Users with corporate CAs can now either use the system trust store via --use-system-ca flag, or specify their CA cert path in the provider's tls.ca option.

Documentation added to packages/web/src/content/docs/network.mdx with examples for proxy configuration, custom CAs, and mTLS setup.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6025 **State:** open **Merged:** No --- Add support for configuring TLS options and HTTP proxy per provider, enabling use of corporate proxies, self-signed certificates, and mTLS. New provider options: - tls.rejectUnauthorized: Accept self-signed certificates - tls.cert: Client certificate path for mTLS - tls.key: Client private key path for mTLS - tls.ca: Custom CA certificate path(s) - proxy: HTTP proxy URL (overrides HTTPS_PROXY env var) The TLS config is passed to Bun's native fetch using Bun.file() for cert/key/ca paths. The proxy option uses Bun's built-in proxy support. For system-wide certificate trust, users can set: - NODE_OPTIONS="--use-system-ca" or BUN_OPTIONS="--use-system-ca" - NODE_EXTRA_CA_CERTS=/path/to/ca.pem Documenting this resolves #1694 - Users with corporate CAs can now either use the system trust store via --use-system-ca flag, or specify their CA cert path in the provider's tls.ca option. Documentation added to packages/web/src/content/docs/network.mdx with examples for proxy configuration, custom CAs, and mTLS setup.
yindo added the pull-request label 2026-02-16 18:16:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11703