-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(bedrock): honor VS Code proxy and custom CA to enable TLS behind corporate proxies #7081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've reviewed the changes and found some issues that need attention. The implementation correctly addresses the SSL validation issue with corporate proxies, but there are some critical type safety and error handling concerns that should be addressed.
131216d to
eee9659
Compare
|
Hey @pballou Thank you for your contribution! I think the best solution to this is to create a centralized HTTP client and define all the proxy settings there, adding it only on bedrock means we are adding technical debt that needs to be dealt with later. I'm closing this PR but feel free to continue the discussion! |
Related GitHub Issue
Closes: #4446
Description
Fix Bedrock SSL errors behind corporate proxies by:
NodeHttpHandlerthat:HTTPS_PROXY,HTTP_PROXY,ALL_PROXY) and custom CA bundles (NODE_EXTRA_CA_CERTS,AWS_CA_BUNDLE)http.proxyandhttp.proxyStrictSSL)proxy-agentwhen a proxy is present and falls back to securehttps.Agentotherwise@smithy/node-http-handlerandproxy-agenttsconfig.jsonTest Procedure
pnpm install && cd src && pnpm vsix, then install the generated.vsix.In your shell:
Configure VS Code:
http.proxy→ your corporate proxyhttp.proxyStrictSSL→ true if providing the CAIn Roo Code:
Tested on macOS Sequoia 15.5 behind corporate proxy.
Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Additional Notes
Secure defaults preserved. TLS not globally disabled.
Get in Touch
Discord: pattywaggon
Important
Fixes Bedrock SSL errors behind corporate proxies by adding a custom
NodeHttpHandlerinbedrock.tsto handle proxies and custom CAs.createNodeHttpHandler()inAwsBedrockHandlerinbedrock.tsto handle proxies and custom CAs usingNodeHttpHandler.http.proxy,http.proxyStrictSSL) and environment variables (HTTPS_PROXY,HTTP_PROXY,ALL_PROXY,NODE_EXTRA_CA_CERTS,AWS_CA_BUNDLE).proxy-agentfor proxy handling andhttps.Agentfor direct connections.@smithy/node-http-handlerandproxy-agenttopackage.json.tsconfig.jsonto fix type issues.This description was created by
for b10e029. You can customize this summary. It will automatically update as commits are pushed.