Skip to content

feat: global proxy fallback (network.proxy + HTTPS_PROXY env) #3

@cncoder

Description

@cncoder

背景

当前 openclaw.json 里代理配置必须逐个 channel 写(channels.discord.proxy / channels.telegram.proxy)。Gateway 自身和新增 channel 没有统一回退路径。实测:Mac 上仅设 launchd HTTPS_PROXY 环境变量,Discord websocket(ws 库)仍直连 — 因为 ws 不读 env,必须显式传 agent

提案

  1. 顶层新增 network.proxy 字段,所有 channel / gateway 出口默认继承
  2. 未显式配置时自动读取 HTTPS_PROXY / ALL_PROXY 环境变量
  3. 各 channel 的 proxy 字段保持最高优先级(per-channel override)
  4. Schema 加 network.noProxy(CIDR / hostname 列表)

优先级顺序

channels.<name>.proxy > network.proxy > HTTPS_PROXY env > direct

影响

  • 新增 channel 不用再逐个踩坑
  • 用户配置 1 处生效全局,降低社区 issue 量

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