Skip to content

Honor VS Code proxy settings in storage data-plane clients#1530

Draft
alexweininger wants to merge 2 commits into
mainfrom
alexweininger/storage-proxy-support
Draft

Honor VS Code proxy settings in storage data-plane clients#1530
alexweininger wants to merge 2 commits into
mainfrom
alexweininger/storage-proxy-support

Conversation

@alexweininger

Copy link
Copy Markdown
Member

Problem

On networks that require an explicit HTTP proxy for outbound traffic (common in corporate/SSL-inspection environments), storage data-plane operations fail. The @azure/storage-blob, @azure/storage-file-share, and @azure/storage-queue SDKs only consult the standard proxy environment variables via their built-in pipeline; they never read VS Code's http.proxy / http.noProxy settings. So a user who has configured a proxy in VS Code (but not in their environment) can browse resources via ARM yet cannot list blobs, files, or queues.

Related to #1527.

Change

  • Adds src/utils/proxyUtils.ts with a small withProxyOptions(endpointUrl, options?) helper. It resolves proxy configuration through the shared getProxySettings() exported from @microsoft/vscode-azext-azureutils and merges the resulting proxyOptions into a client's StoragePipelineOptions. When no proxy applies to the endpoint (host matched by http.noProxy/NO_PROXY, or proxy support disabled), it returns the options unchanged.
  • Wires it into the Blob, File, and Queue service clients in StorageAccountTreeItem (both shared-key and token paths) and the Blob client in BlobContainerFS.

getProxySettings() honors http.proxy (with HTTPS_PROXY/ALL_PROXY/HTTP_PROXY as fallback), http.noProxy (union with NO_PROXY), and http.proxySupport: 'off' as a full opt-out. This mirrors the shared ARM-side fix in microsoft/vscode-azuretools#2356.

Scope / follow-ups

  • Table (@azure/data-tables) does not expose proxyOptions, so TableServiceClient is intentionally left out and deferred.
  • proxyStrictSSL: false is not expressible through proxyOptions (the SDK builds its own proxy agent). CA trust remains covered by NODE_EXTRA_CA_CERTS as documented in the troubleshooting sections.
  • Emulator/localhost and connection-string-only attached-account paths are not proxied here.

Dependency

Important

This depends on getProxySettings() from @microsoft/vscode-azext-azureutils 4.3.0, added in microsoft/vscode-azuretools#2356. Kept as a draft until that publishes; package.json is bumped to ^4.3.0.

alexweininger and others added 2 commits July 1, 2026 11:34
The @azure/storage-blob, -file-share, and -queue SDKs do not read VS Code's
http.proxy / http.noProxy settings on their own, so data-plane operations fail
on corporate networks that require an explicit proxy for outbound traffic.

Add a small withProxyOptions() helper that resolves proxy configuration via the
shared getProxySettings() from @microsoft/vscode-azext-azureutils and merges it
into each service client's StoragePipelineOptions. Wire it into the Blob, File,
and Queue clients in StorageAccountTreeItem plus the Blob client in
BlobContainerFS.

Table (@azure/data-tables) does not expose proxyOptions and is deferred.
proxyStrictSSL:false is likewise not expressible through proxyOptions.

Related to #1527

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
getDataLakeClients constructs DataLakeServiceClient and DataLakePathClient,
which is the code path for hierarchical-namespace (Data Lake Gen2) accounts.
These were left unproxied while the sibling blob client was wired, so file-system
operations on HNS accounts would still fail behind a corporate proxy. Wire both
through withProxyOptions, mirroring the blob path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant