Skip to content

feat(proxy): route proxy-native sessions through the standard env proxy - #169

Merged
brightsparc merged 2 commits into
mainfrom
claude/eloquent-euler-1ygb45
Oct 14, 2026
Merged

brightsparc merged 2 commits into
mainfrom
claude/eloquent-euler-1ygb45

Conversation

@brightsparc

Copy link
Copy Markdown
Contributor

Companion to introspection-org/introspection-cloud#3294 (proxy-native sandbox egress, Phase 5; design: docs/design/sandbox-egress-proxy-native.md there).

What

  • When INTROSPECTION_EGRESS_PROXY_NATIVE=1 is set, or there is no INTROSPECTION_EGRESS_URL, the httpx and httpx2 transports stop rewriting requests onto the egress. Requests go through the forward proxy with Proxy-Authorization from the HTTPS_PROXY userinfo, honouring NO_PROXY and SSL_CERT_FILE.
  • An https:// proxy is now verified with the same TLS context as the origins, so an explicit verify= also covers the proxy hop. This matters for the public egress listener that external sandboxes use.
  • Runtimes without the flag keep the legacy endpoint rewriting unchanged.

Testing

tests/rest/test_proxy.py and test_proxy_httpx.py cover these cases against local CONNECT proxies (tests/rest/proxy_servers.py), over both http:// and https:// proxy forms with a test CA:

  • native routing;
  • a 407 without the credential;
  • NO_PROXY;
  • the legacy rewrite staying as it was.

uv.lock gains the test-only dependency.

Follow-up

A separate Phase 6 branch deletes the legacy rewrite. It is held until no live runtime predates Phase 5.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PsWKFYjGgYoYxChyJMtT8R


Generated by Claude Code

A runtime advertising INTROSPECTION_EGRESS_PROXY_NATIVE=1 gets the session
credential as userinfo in HTTPS_PROXY and no egress URL, so the transports
no longer rewrite requests to the egress when the flag is set or the egress
URL is unset. Requests go through the forward proxy with Proxy-Authorization,
honouring NO_PROXY and SSL_CERT_FILE. An https:// proxy is now verified with
the same TLS context as origins, so an explicit verify= also covers it.

Runtimes without the flag keep the legacy endpoint rewriting unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsWKFYjGgYoYxChyJMtT8R
…-1ygb45

# Conflicts:
#	pyproject.toml
#	uv.lock
@brightsparc
brightsparc merged commit ad84db7 into main Oct 14, 2026
5 checks passed
@brightsparc
brightsparc deleted the claude/eloquent-euler-1ygb45 branch October 14, 2026 22:04

This branch was successfully deployed

1 active deployment
build — 343c7744 Deployed Oct 12, 2026 by brightsparc via Unit Tests #461
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