Skip to content

Conversation

@ssncferreira
Copy link
Contributor

@ssncferreira ssncferreira commented Jan 9, 2026

Description

Implements selective MITM (Man-in-the-Middle) in aibridgeproxyd so that only requests to allowlisted domains are intercepted and decrypted. Requests to all other domains are tunneled directly without decryption.

Changes

  • New config option: CODER_AIBRIDGE_PROXY_DOMAIN_ALLOWLIST (default: api.anthropic.com,api.openai.com)
  • Selective MITM: Uses goproxy.ReqHostIs() to only intercept CONNECT requests to allowlisted hosts
  • Certificate caching: Now only generates/caches certificates for allowlisted domains
  • Validation: Startup fails if domain allowlist is empty or contains invalid entries

Closes: coder/internal#1182

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ssncferreira ssncferreira force-pushed the ssncferreira/aibridge-proxy-domain-allowlist branch from 3c720ed to 6f2d0b6 Compare January 9, 2026 20:36
@ssncferreira ssncferreira changed the title feat(aibridgeproxyd): implement selective MITM with configurable domain allowlist feat: implement selective MITM with configurable domain allowlist in aibridgeproxyd Jan 9, 2026
@ssncferreira ssncferreira force-pushed the ssncferreira/aibridge-proxy-domain-allowlist branch 3 times, most recently from 0aaa55d to 6aef963 Compare January 12, 2026 11:17
@ssncferreira ssncferreira marked this pull request as ready for review January 12, 2026 11:23
@ssncferreira ssncferreira force-pushed the ssncferreira/aibridge-proxy-domain-allowlist branch from 6aef963 to 3b03730 Compare January 12, 2026 11:29
@ssncferreira ssncferreira force-pushed the ssncferreira/aibridge-proxy-domain-allowlist branch from 3b03730 to 117336c Compare January 12, 2026 11:46
@ssncferreira ssncferreira force-pushed the ssncferreira/aibridge-proxy-domain-allowlist branch from a419741 to c3758ba Compare January 13, 2026 11:21
@ssncferreira ssncferreira merged commit 74b6d12 into main Jan 13, 2026
36 checks passed
@ssncferreira ssncferreira deleted the ssncferreira/aibridge-proxy-domain-allowlist branch January 13, 2026 11:30
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aibridge: implement selective request decryption

3 participants