Repository navigation
Description
Problem
OpenCodex currently supports a process-wide outbound proxy, mirrored into
HTTP_PROXY / HTTPS_PROXY, while proxy bypasses must come from the parent
process environment through NO_PROXY.
This is awkward for desktop-managed or auto-started OpenCodex instances:
- setting a user/session-level
NO_PROXYaffects unrelated applications; - shell-only exports may not reach launchd, Desktop, or auto-started processes;
- provider endpoints that are more reliable direct than through a local tunnel
currently require either launcher-specific environment wiring or a source
patch.
Proposal
Add an optional OpenCodex-scoped configuration field:
{
"proxy": "http://127.0.0.1:7897",
"noProxy": [
"api.example-provider.com"
]
}At startup, applyProxyEnv() would merge config.noProxy with:
- any inherited
NO_PROXY/no_proxyentries; - the existing loopback defaults (
localhost,127.0.0.1,::1,[::1]).
The merged value would be assigned only to the OpenCodex process environment.
It must not mutate the user/session environment.
Expected behavior
proxyremains the default route for provider outbound traffic.- Hosts matching
noProxybypass the proxy. - Other applications remain unaffected.
- Existing environment-based
NO_PROXYbehavior remains backward compatible. - Matching should use the same hostname/suffix semantics already used by
OpenCodex's outbound policy.
Why a global noProxy list first
A provider-level proxy object would be more flexible, but it would also affect
catalog fetches, OAuth, sidecars, redirects, and provider-specific transports.
A process-scoped bypass list is a smaller extension of the current
proxy/NO_PROXY architecture and solves the desktop/autostart use case
without changing provider schemas.
Suggested implementation surface
OcxConfig: addnoProxy?: string[]- config parsing/validation and diagnostics
applyProxyEnv(config): normalize, deduplicate, and merge entries- documentation and tests covering inherited values, loopback defaults,
suffix matching, and no leakage to the parent/user environment
Activity
github-actions commentedon Aug 7, 2026
Automated translation bookkeeping — detected language: unknown.
github-actions commentedon Aug 7, 2026
Maintainer decision respected
A maintainer has reopened this issue. The automated closure has been deactivated.
Ingwannu commentedon Aug 10, 2026
Confirmed on current
dev: this is a real configuration gap.applyProxyEnv()currently merges only inheritedNO_PROXY/no_proxywith the loopback defaults, and both the server andocx ensure/ocx syncpaths use that process environment.A scoped
noProxyfield is a reasonable direction, but it is also part of the credential-destination boundary because direct private-network routing is validated againstNO_PROXY. A focused implementation must therefore:allowPrivateNetworkas a separate explicit requirement: addingnoProxymust not by itself authorize a provider or redirect to a private destination;Keeping this open for a focused config/transport PR under those boundaries.
lidge-jun commentedon Aug 19, 2026
리뷰 · 우선순위 58 / 80
현재
dev의applyProxyEnv()는 프로세스 전역proxy만HTTP_PROXY/HTTPS_PROXY에 미러하고, 우회 목록은 상속된NO_PROXY/no_proxy와 루프백 기본값(localhost,127.0.0.1,::1,[::1])만 합칩니다.src/config.ts해당 함수는config.noProxy를 읽지 않고,config.proxy가 없으면 즉시 return 합니다. 서버 기동과ocx ensure/ocx sync가 같은 함수를 쓰므로 데스크톱 자동시작과 CLI 동기화가 같은 공백을 공유합니다.이슈가 원하는 것은 OpenCodex 범위의
noProxy: string[]입니다. 사용자 세션의NO_PROXY를 바꾸지 않고, 프로바이더 아웃바운드만 특정 호스트를 직접 가게 하자는 요청입니다. 데스크톱/launchd/서비스는 셸 export를 못 받을 수 있어서, 부모 환경에만 의존하는 지금 구조가 어색합니다.매칭 코드는 이미
src/lib/provider-outbound.ts의noProxyMatches()에 있습니다. 이 함수도process.env.NO_PROXY만 봅니다.allowPrivateNetwork와 프록시가 같이 켜지면 사설망 목적지는NO_PROXY에 호스트를 넣으라는 오류를 냅니다. 그래서noProxy는 단순 UX가 아니라 자격 증명 목적지 경계입니다. 설정 우회가 사설망으로 키를 보내면 프록시 터널을 건너뜁니다.Windows/서비스 위생 측면에서 범위는 프로세스 env로 제한해야 합니다. 사용자/세션 환경을 바꾸면 다른 앱에 새고, 반대로 설정만 넣고
applyProxyEnv를 안 타면 카탈로그 fetch와 추론 경로가 갈라집니다. 프로바이더별 프록시 객체는 카탈로그, OAuth, 사이드카까지 건드리므로 이슈가 말한 전역 리스트가 더 작은 확장입니다.해결방안은
OcxConfig에noProxy?: string[]를 두고applyProxyEnv에서 상속값·루프백·설정값을 정규화·중복 제거한 뒤process.env.NO_PROXY에만 쓰는 것입니다. 부모 환경은 읽기만 하고, 매칭은 기존noProxyMatches의미와 같게 유지합니다. 패치는 추측하지 않으며, 현재 트리에 설정 필드noProxy는 없습니다.이 댓글은 grok-bot이 작성했습니다
devlog: quota-window and backlog roadmap (260826) (#2644)
lidge-jun commentedon Aug 26, 2026
Shipped on
devas01b5da9f5(#2661).noProxyaccepts either a comma-separated string or an array — a deviation from thestring[]you asked for, recorded deliberately: the siblingproxyfield is a string andNO_PROXYsyntax is comma-separated, so both forms are what people will actually reach for. They normalize identically.Entries are merged into the existing
NO_PROXYhandling rather than replacing it: an inherited value is preserved, loopback stays excluded unconditionally, and dedupe is case-insensitive while keeping your original casing in the emitted value. Documented in the configuration reference next toproxy.One behaviour worth knowing:
noProxywithoutproxyis a no-op by design. WritingNO_PROXYfor a process that proxies nothing would leak OpenCodex config into unrelated child processes.devlog: quota-window and backlog roadmap (260826) (lidge-jun#2644)
devlog: quota-window and backlog roadmap (260826) (lidge-jun#2644)