Skip to content

PAC 5 - Add network proxy system proxy routing#27248

Closed
canvrno-oai wants to merge 3 commits into
mainfrom
canvnro/codex-pac-pr5-network-proxy-pac
Closed

PAC 5 - Add network proxy system proxy routing#27248
canvrno-oai wants to merge 3 commits into
mainfrom
canvnro/codex-pac-pr5-network-proxy-pac

Conversation

@canvrno-oai

@canvrno-oai canvrno-oai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stacks on PAC 4 - Add macOS system proxy resolver #26709 and extends respect_system_proxy to sandboxed command egress through network-proxy.
  • When enabled, HTTP, CONNECT, and MITM upstream requests use system proxy/PAC/WPAD resolution, then environment proxy variables, then DIRECT.
  • Leaves existing network-proxy behavior unchanged when the feature is disabled.

Implementation

  • Exposes the shared URL-specific system proxy route decision from codex-client.
  • Carries respect_system_proxy into the network-proxy runtime configuration.
  • Resolves each target URL before HTTP, CONNECT, and MITM upstream routing.
  • Converts supported HTTP proxy routes for the upstream client; unavailable, invalid, or unsupported system routes fall back to environment proxy settings.
  • Preserves direct routing when upstream proxies are disallowed.

Known limitation

Only the first supported system/PAC proxy candidate is used. A connection failure does not currently advance to subsequent proxy or DIRECT candidates. This matches the current native-client behavior and leaves ordered fallback support for a future improvement.

Tests

  • just test -p codex-client -p codex-network-proxy (209 passed)
  • just test -p codex-core --lib (1,893 passed; 3 skipped)
  • just clippy -p codex-client -p codex-network-proxy -p codex-core
  • just fmt
  • just bazel-lock-check

@canvrno-oai canvrno-oai changed the title PAC - Add network proxy system proxy routing PAC 5 - Add network proxy system proxy routing Jun 9, 2026
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from b9e4832 to 6158992 Compare June 10, 2026 18:24
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 6b58ee0 to 44a3c57 Compare June 10, 2026 18:24
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from 6158992 to e4b8b92 Compare June 10, 2026 20:42
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 44a3c57 to 01d6011 Compare June 10, 2026 20:42
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from e4b8b92 to 93e4e84 Compare June 11, 2026 19:14
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 01d6011 to d37008e Compare June 11, 2026 19:14
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from 93e4e84 to c91497e Compare June 11, 2026 20:13
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from d37008e to 47a3c4c Compare June 11, 2026 20:13

@viyatb-oai viyatb-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One runtime responsiveness issue to address in the network-proxy integration.

Comment thread codex-rs/network-proxy/src/upstream.rs Outdated
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from 5dd8971 to bc39031 Compare June 16, 2026 06:57
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 99a4b71 to b36ead5 Compare June 16, 2026 07:35
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from bc39031 to ab61237 Compare June 16, 2026 16:44
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from b36ead5 to a55393f Compare June 16, 2026 17:06
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from 7354130 to 19ccecb Compare June 16, 2026 20:30
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from a55393f to 582b5e0 Compare June 16, 2026 20:31
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from ac90f94 to bf35429 Compare June 17, 2026 01:00
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 7581cbf to c8dafdd Compare June 17, 2026 01:01
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from bf35429 to ac0677a Compare June 17, 2026 18:52
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from c8dafdd to 529e393 Compare June 17, 2026 18:53
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch from ac0677a to 9fb47f7 Compare June 17, 2026 20:20
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 529e393 to b009471 Compare June 17, 2026 20:20
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr4-mac branch 4 times, most recently from 5b73387 to 4627c3e Compare June 22, 2026 21:48
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch 2 times, most recently from ac8a209 to 8261c5e Compare June 23, 2026 00:25
Base automatically changed from canvnro/codex-pac-pr4-mac to main June 23, 2026 00:56
@canvrno-oai
canvrno-oai force-pushed the canvnro/codex-pac-pr5-network-proxy-pac branch from 8261c5e to 097602b Compare June 23, 2026 00:59
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants