Skip to content

bug(proxy): proxy.noProxy is ignored on cold start and UI runtime env #253

Description

@MicroMilo

Summary

proxy.noProxy is supported by the proxy helper and hot-reload path, but it is not passed during CLI cold start or into the UI runtime environment.

Why it matters

A user can configure proxy.noProxy to bypass a proxy for localhost, internal services, or specific domains. After hot reload, that value can be respected, but on cold start and in the UI runtime env the same config is ignored. This makes proxy behavior depend on how PilotDeck was started or reloaded.

Evidence

  • ui/src/components/settings/view/tabs/PilotDeckConfigTab.tsx:690 exposes and writes proxy.noProxy.
  • src/cli/proxy.ts:46 defines installGlobalProxy(explicitUrl?: string, extraNoProxy?: string), so the helper accepts a no-proxy value.
  • src/cli/proxy.ts:150 to src/cli/proxy.ts:154 builds the effective no-proxy list from process env, extraNoProxy, 127.0.0.1, and localhost.
  • src/cli/pilotdeck.ts:37 calls installGlobalProxy(snapshot.config.proxy.url) during initial startup and does not pass snapshot.config.proxy.noProxy.
  • src/cli/pilotdeck.ts:151 calls reinstallGlobalProxy(proxyConfig?.url, proxyConfig?.noProxy) on hot reload, so the reload path has the value that cold start omits.
  • ui/server/services/pilotdeckConfig.js:306 defines buildRuntimeEnv(config).
  • ui/server/services/pilotdeckConfig.js:321 to ui/server/services/pilotdeckConfig.js:327 sets only HTTPS_PROXY and https_proxy; it does not set NO_PROXY or no_proxy.

Validation

Validation level: dynamic plus source control-flow confirmation.

Reproduction called buildRuntimeEnv({ proxy: { url, noProxy } }).

Key output: the returned env included HTTPS_PROXY, but NO_PROXY was absent/null. Source control flow confirms the CLI startup path also drops noProxy, while the hot-reload path passes it.

Boundary: this did not perform a live network request through a real proxy. The failure is at config propagation: the configured field is present, the helper supports it, but two runtime entry points do not pass it.

Expected behavior

proxy.noProxy should be applied consistently across cold start, hot reload, and the UI runtime environment.

Existing coverage checked

Partially covered by adjacent work only. PR #239 improved proxy/no-proxy support in the helper and dispatcher layer, and PR #158 brought top-level proxy/noProxy config into the Settings area. However, current main still omits proxy.noProxy at src/cli/pilotdeck.ts:37 and does not export it from buildRuntimeEnv(...).

Coverage checked by searching for proxy.noProxy, installGlobalProxy, reinstallGlobalProxy, NO_PROXY, and buildRuntimeEnv proxy.

Suggested fix

Pass snapshot.config.proxy.noProxy into the initial startup call:

installGlobalProxy(snapshot.config.proxy.url, snapshot.config.proxy.noProxy)

Also update buildRuntimeEnv(...) to set both NO_PROXY and no_proxy when normalized.proxy?.noProxy is configured.

Suggested tests

  • Cold start passes configured proxy.noProxy to installGlobalProxy(...).
  • Hot reload continues to pass updated proxy.noProxy.
  • buildRuntimeEnv(...) returns HTTPS_PROXY, https_proxy, NO_PROXY, and no_proxy when both proxy URL and no-proxy list are configured.
  • Existing behavior remains unchanged when only proxy URL is configured.
  • Existing behavior remains unchanged when proxy config is absent.

Submitted with Codex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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