Skip to content

[Bug]: Built-in cloud provider add flow hides private-network opt-in under fake-IP DNS #212

Closed

Description

@apple-ouyang

Summary

OpenCodex 2.7.30 correctly rejects a provider hostname when DNS resolves it into the benchmark range, but the Add Provider modal hides the existing allowPrivateNetwork opt-in for built-in cloud presets.

This is reproducible with Clash Verge Rev / Mihomo in fake-ip mode: api.deepseek.com resolves to 198.18.1.6, which falls inside the configured 198.18.0.1/16 fake-IP range. Adding the built-in DeepSeek preset then fails with:

baseUrl hostname api.deepseek.com resolves to a benchmark address (198.18.1.6); set allowPrivateNetwork:true only for intentionally local/self-hosted providers

Commit 109b767 added the GUI opt-in, but AddProviderModal.tsx renders it only when (isCustom || isLocal). A built-in cloud preset is neither, and the provider does not exist yet, so the Settings-tab toggle is unreachable.

Expected behavior: the Add Provider flow should expose the guarded opt-in for non-reserved presets (disabled by default, with the existing security warning). It should never auto-enable it.

Reproduction

  1. Use Clash/Mihomo DNS with enhanced-mode: fake-ip and fake-ip-range: 198.18.0.1/16.
  2. Confirm api.deepseek.com resolves to 198.18.1.6.
  3. Run ocx gui on OpenCodex 2.7.30.
  4. Choose the built-in DeepSeek provider and submit it.
  5. Observe the benchmark-address error.
  6. Observe that the Add Provider form has no Allow local/private network checkbox.

Workaround

Add api.deepseek.com to the proxy DNS fake-ip-filter (preferred for a public provider), or use the CLI --allow-private-network flag when this routing is intentional.

Area

GUI dashboard

Version

2.7.30 (e61dfba)

OS

macOS 26.5.2 arm64

Config shape

{
  "providers": {
    "deepseek": {
      "adapter": "openai-chat",
      "baseUrl": "https://api.deepseek.com",
      "allowPrivateNetwork": true
    }
  }
}
  • I searched existing issues and docs first.
  • I removed secrets, tokens, and personal data from logs and screenshots.

Activity

  1. lidge-jun commented on Jul 21, 2026

    @lidge-jun
    Owner

    v2.7.31에 수정 반영했습니다. built-in cloud preset에서도 private-network opt-in을 명시적으로 선택할 수 있게 했고, reserved forward provider에는 해당 권한이 전달되지 않도록 제한했습니다. 반영 커밋: f2fa0c2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions