-
Notifications
You must be signed in to change notification settings - Fork 469
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
Proxy Support #185
Comments
microsoft/vscode#12588 |
Tested with latest VSCode and latest aws-toolkit-vscode build but it did not help.
|
I'm assuming all VS Code-written networking features work fine? If so, the proxy is probably only affecting the AWS JS SDK and CLI (both of which we leverage). For our future reference, here's how to implement a proxy with the JS SDK (we'll have to implement this) https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-configuring-proxies.html . If you're getting blocked on SAM-related calls (such as deploying functions), this should work if you export these for all new sessions (we'll look to add a configuration for this through VS Code directly): https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-proxy.html |
This comment was marked as outdated.
This comment was marked as outdated.
Status2024From microsoft/vscode#12588 (comment) :
This configuration was observed to work (on macOS):
2020From microsoft/vscode#12588 (comment) :
Patch for trying that in our codebase (sdk v2): diff --git a/src/shared/awsClientBuilder.ts b/src/shared/awsClientBuilder.ts
index 12bfde9bfe86..9622a5d0267e 100644
--- a/src/shared/awsClientBuilder.ts
+++ b/src/shared/awsClientBuilder.ts
@@ -7,6 +7,7 @@ import { ServiceConfigurationOptions } from 'aws-sdk/lib/service'
import { env, version } from 'vscode'
import { AwsContext } from './awsContext'
import { pluginVersion } from './constants'
+import * as proxyagent from 'proxy-agent'
-
export interface AWSClientBuilder {
createAndConfigureServiceClient<T>(
@@ -34,6 +35,9 @@ export class DefaultAWSClientBuilder implements AWSClientBuilder {
awsServiceOpts = {}
}
-
+ // awsServiceOpts.httpOptions = { agent: new proxyagent('http://example.com') }
+ awsServiceOpts.httpOptions = { proxy: 'http://example.com' }
+
if (!awsServiceOpts.credentials) {
awsServiceOpts.credentials = await this._awsContext.getCredentials()
} And/or we may need to provide the ability to specify paths to certificates. In the node.js API typically this is the
Workaroundsref microsoft/vscode#189133 microsoft/vscode-test-cli#7
Related
|
@justinmk3 has there been any more updates on the ability to specify paths on the CA certificates? I'm having this exact issue and the SAM team sent me over to the toolkit team. See (aws/aws-sam-cli#1981) for details. A member of my team also mentioned it here (#917 (comment)). |
@boyersnet no update since #185 (comment) .
Do you do this in other software? Examples would be helpful. |
@justinmk3 - In order to get the docker container to work with SAM CLI, I had to pass the path to my cert bundle as an env variable (AWS_CA_BUNDLE - per AWS CLI documentation). Once that was done, the call to SSM worked as expected from the container. The problem I face now is how to debug in VS Code with the toolkit. The toolkit should follow the same pattern as the AWS CLI and respect order specified here: https://docs.aws.amazon.com/cli/latest/topic/config-vars.html |
Thanks for mentioning that. |
Related: VSCode 1.51 release notes mention
|
Describe the bug
When trying to install and run behind a corporate proxy solution (MITM) the extension will time-out after some while with the following message
To Reproduce
HTTP_PROXY
andHTTPS_PROXY
config.Select your profile in Visual Studio Code
View > Command Palette...
and search forAWS
.AWS: Connect to AWS
Expected behavior
Something should load ...
Desktop (please complete the following information):
Additional context
There is a experimental setting in VS Code
"http.proxySupport": "on"
This does not work.
The text was updated successfully, but these errors were encountered: