You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proxy support for Visual Studio Code has been introduced recently through environment variables/settings (see https://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support). As an extension developer I would like to use these settings when requesting resources from the internet. My current implementation fails for users using a proxy.
What is the recommended way for an extension to use a proxy?
I could not find a vscode API that exposes methods to make requests using a proxy other than access to the proxy settings (workspace.getConfiguration()) and implementing everything on my own. Looking at the Visual Studio Code code base I identified the code that adds support for proxies, but copy&paste it into my extension would result in duplicated and potentially outdated code, which is something I want to avoid whenever possible. As I am probably not the only extension developer accessing the internet, I would like to hear your opinion on this issue. Any feedback would be greatly appreciated.
Reacted by Dima, Nikita Demin, DarkLite1, Patrick Westerhoff, Sascha Stumpler, Adrian Torrie, shyyko.serhiy, Michal, Daniele Torino, Huachao Mao and 98 more
Reacted by Stronger, Dima Abramovich, Rade Martinović, Míla Kuchta, heardsandbats, milidubey, Tomas and Wang Siyuan
Reacted by Michal Čaplygin, Simon Bruguerolle, Francis, Assaf Sapir, heardsandbats and Aurélien Joga
-1 for adding this for to the API but +1 for extracting our code into a node-module. João Moreno (@joaomoreno) how feasible is that? how much code do we add on top of other node-modules?
Reacted by Howie Wang
Reacted by Stronger, Xuan, b2az, Leandro Piccilli, xiyuecangxin, Rade Martinović, Koray Tugay, Oliver Olsen, Sam Stewart and Ryan Zmuda
Brian Ingles (@bmingles) We discovered that Chromium's fetch (or what Electron surfaces) is not feature-identical with Node.js' fetch and so we have moved on to add proxy support to Node.js' fetch. We expect that to offer better compatibility for code written for Node.js' fetch and have enabled it by default in the user settings:
Our work for making Chromium/Electron's fetch available can also be enabled in the user settings if you want to give that a try:
Also: The patched fetch and https module both support Kerberos and basic auth and load SSL certificates from the OS.
For remote connections the upcoming VS Code 1.97 (and current VS Code Insiders) adds a remote user setting to control whether or not the remote extensions should use the same proxy configuration as the local extensions.
@bmingles We discovered that Chromium's fetch (or what Electron surfaces) is not feature-identical with Node.js' fetch and so we have moved on to add proxy support to Node.js' fetch. We expect that to offer better compatibility for code written for Node.js' fetch and have enabled it by default in the user settings:
Our work for making Chromium/Electron's fetch available can also be enabled in the user settings if you want to give that a try:
Thanks Christof Marti (@chrmarti),
We use self-signed certs for some of our servers and are currently setting the NODE_EXTRA_CA_CERTS env variable in the process running VS Code to include our signing CA certs. There are no proxies involved here, it just seems to be what is required to get NodeJS to trust additional certs.
Any chance these changes will make it possible for extensions to use the OS trust store instead of requiring NODE_EXTRA_CA_CERTS to be set, or does this only apply to proxy scenarios?
Brian Ingles (@bmingles) You can add the certificate to the OS trusted root certificates, these should all be picked up. (Restart VS Code after changing the OS trust store.)
Brian Ingles (@bmingles) It is not documented beyond the settings itself. We have paused our effort to make it ready to become the default because we have found a way to add proxy support to Node.js' fetch and will likely keep that as the default. That also supports OS certificates and you can pass it an Agent from the undici library to enable http2 if required.
Reacted by Syaifulnizam Shamsudin
SyaifulnizamshamsudinMax123 commented on Aug 8, 2025
Proxy support for Visual Studio Code has been introduced recently through environment variables/settings (see https://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support). As an extension developer I would like to use these settings when requesting resources from the internet. My current implementation fails for users using a proxy.
What is the recommended way for an extension to use a proxy?
I could not find a vscode API that exposes methods to make requests using a proxy other than access to the proxy settings (workspace.getConfiguration()) and implementing everything on my own. Looking at the Visual Studio Code code base I identified the code that adds support for proxies, but copy&paste it into my extension would result in duplicated and potentially outdated code, which is something I want to avoid whenever possible. As I am probably not the only extension developer accessing the internet, I would like to hear your opinion on this issue. Any feedback would be greatly appreciated.
Thanks you.
Syaifulnizam Shamsudin (@SyaifulnizamshamsudinMax123) Extensions automatically get the proxy support we added. Currently fetch, http and https all have proxy support added and most NPM packages for network requests use one of these. Please open a bug report if that doesn't work for your extension. Thanks.
This is still not working. I tried setting https_proxy with either a local proxy (PX) or simply using a fixed proxy Url. Not working. I tried setting proxy in settings.json - not working (that seems to not allow a PAC Url - does it?) I tried --proxy-pac-url - not working. It simply can not find any extension when using CLI code --install-extension . The IDs I tried are all correct and work just fine when used inside VS Code instead.
SyaifulnizamshamsudinMax123 commented on Dec 20, 2025
I originally created a workaround for this issue about two years ago for my own use (initially as a Python project). I’ve now cleaned it up, made it cross‑platform compatible, and compiled it into a single binary using Nuitka.
Distributed as a single standalone binary (also available via PyPI)
Downloads and installs VS Code extensions, extension packs, and marketplace signatures
Reads extension IDs from your devcontainer.json (or any JSON file containing a devcontainer extension block)
Verifies extension signatures using vsce-sign
Supports offline bundles (export/import) for air‑gapped machines
It was originally built to solve my own workflow needs related to this issue (see #12588 and #29910), but I decided to publish it in case it’s useful to others.
⚠️ Disclaimer:
The Windows and macOS binaries (as well as the Python scripts on those platforms) have not been extensively tested there, although they should work. Feedback and testing on those platforms would be very welcome.
Hope this helps anyone still affected by this issue.
Unable to load schema from 'http://json.schemastore.org/package': Not Found. The requested location could not be found.
Unable to connect to http://json.schemastore.org/package. Error: connect EBADF 20.42.128.105:80.
in any package.json file I open, and I'm not sure what's going on. I do not have a proxy (this is a residential network). Loading the URL through my browser correctly nets me what looks like a 40Kb schema file.
Activity
jrieken commentedon Sep 28, 2016
-1 for adding this for to the API but +1 for extracting our code into a node-module. João Moreno (@joaomoreno) how feasible is that? how much code do we add on top of other node-modules?
joaomoreno commentedon Sep 28, 2016
It's thin.
[-]Expose an API for extensions to use a proxy[/-][+]Make proxy code reusable[/+]jrieken commentedon Sep 28, 2016
I leaving it with you then ;-)
CodeZombieCH commentedon Sep 28, 2016
A node package sounds like a cool solution. Let me know when it's ready so I can test it and provide feedback.
joaomoreno commentedon Apr 26, 2017
We're going with a different proxy solution in the future, skipping this.
CodeZombieCH commentedon Apr 26, 2017
Do you have any details about that future solution?
61 remaining items
chrmarti commentedon Feb 5, 2025
Brian Ingles (@bmingles) We discovered that Chromium's
fetch(or what Electron surfaces) is not feature-identical with Node.js'fetchand so we have moved on to add proxy support to Node.js'fetch. We expect that to offer better compatibility for code written for Node.js'fetchand have enabled it by default in the user settings:Our work for making Chromium/Electron's
fetchavailable can also be enabled in the user settings if you want to give that a try:chrmarti commentedon Feb 5, 2025
Also: The patched
fetchandhttpsmodule both support Kerberos and basic auth and load SSL certificates from the OS.For remote connections the upcoming VS Code 1.97 (and current VS Code Insiders) adds a remote user setting to control whether or not the remote extensions should use the same proxy configuration as the local extensions.
merlinz01 commentedon Feb 5, 2025
bmingles commentedon Feb 5, 2025
Thanks Christof Marti (@chrmarti),
We use self-signed certs for some of our servers and are currently setting the
NODE_EXTRA_CA_CERTSenv variable in the process running VS Code to include our signing CA certs. There are no proxies involved here, it just seems to be what is required to get NodeJS to trust additional certs.Any chance these changes will make it possible for extensions to use the OS trust store instead of requiring
NODE_EXTRA_CA_CERTSto be set, or does this only apply to proxy scenarios?chrmarti commentedon Feb 6, 2025
Merlin (@merlinz01) Could you try with Electron Fetch turned off:

Brian Ingles (@bmingles) You can add the certificate to the OS trusted root certificates, these should all be picked up. (Restart VS Code after changing the OS trust store.)
merlinz01 commentedon Feb 6, 2025
Christof Marti (@chrmarti) I tried turning off the Electron Fetch and restarting VSCode, but it gives the same error.
bmingles commentedon Feb 6, 2025
Christof Marti (@chrmarti) I still need to do some more testing, but looks like the
Http: Electron Fetchworks for our scenario.Thanks!!
Out of curiosity, is
Http: Electron Fetchdocumented somewhere that I missed, or has it just not made it to the docs?docs: Better documentation of trusting SSL certs (#215)
chrmarti commentedon Feb 6, 2025
Merlin (@merlinz01) Could you open a new issue for us to investigate?
Brian Ingles (@bmingles) It is not documented beyond the settings itself. We have paused our effort to make it ready to become the default because we have found a way to add proxy support to Node.js'
fetchand will likely keep that as the default. That also supports OS certificates and you can pass it an Agent from the undici library to enable http2 if required.SyaifulnizamshamsudinMax123 commentedon Aug 8, 2025
chrmarti commentedon Aug 20, 2025
Syaifulnizam Shamsudin (@SyaifulnizamshamsudinMax123) Extensions automatically get the proxy support we added. Currently
fetch,httpandhttpsall have proxy support added and most NPM packages for network requests use one of these. Please open a bug report if that doesn't work for your extension. Thanks.hjrb commentedon Nov 24, 2025
This is still not working. I tried setting https_proxy with either a local proxy (PX) or simply using a fixed proxy Url. Not working. I tried setting proxy in settings.json - not working (that seems to not allow a PAC Url - does it?) I tried --proxy-pac-url - not working. It simply can not find any extension when using CLI code --install-extension . The IDs I tried are all correct and work just fine when used inside VS Code instead.
SyaifulnizamshamsudinMax123 commentedon Dec 20, 2025
Yes true.
macgeneral commentedon Feb 26, 2026
I originally created a workaround for this issue about two years ago for my own use (initially as a Python project). I’ve now cleaned it up, made it cross‑platform compatible, and compiled it into a single binary using Nuitka.
The project is available here:
👉 https://github.com/macgeneral/uVSCEM
Main features
It was originally built to solve my own workflow needs related to this issue (see #12588 and #29910), but I decided to publish it in case it’s useful to others.
The Windows and macOS binaries (as well as the Python scripts on those platforms) have not been extensively tested there, although they should work. Feedback and testing on those platforms would be very welcome.
Hope this helps anyone still affected by this issue.
tiennou commentedon Apr 17, 2026
I'm getting a
in any package.json file I open, and I'm not sure what's going on. I do not have a proxy (this is a residential network). Loading the URL through my browser correctly nets me what looks like a 40Kb schema file.