Replies: 1 comment 1 reply
-
Hello, VSCode uses the same Proxy settings as Chromium like described in docs. Then there is this magical setting 'http.proxySupport'. This overrides all proxy settings for VSCode extensions and activates a separate proxy agent (which cannot use http2). As long as the setting is not set to off, all settings in httpyac are ignored, or so it seems to me. To understand problems with proxy in vscode you can activate extended logging via CLI ('code --log-net-log=netlog.json' ). Maybe this will help you. |
Beta Was this translation helpful? Give feedback.
-
I spent a couple of days troubleshooting issues and helping our devs, and in my observation, majority of people who could not make it work and gave up, did so because they could not make the proxy configuration work.
In CLI, it looks like the proxy is recognized in the
httpyac.config.js
(proxy
element) andrequest_proxy
(environment) variable (this one overrides the other). I got a report form another dev that on a Mac, thehttpyac.config.js
does not work, but I cannot validate because I do not have a Mac. But the CLI case is more or less clear. I thought that CLI also recognizeshttp_proxy
, but in my tests, it did not (not a big deal, maybe it's good that it doesn't, since fewer options make it simpler).The VSCode case is more confusing. VSCode has its own proxy settings, and if not defined, it recognizes
http_proxy
. Then, I assume, you can also use thehttpyac.config.js
(proxy
element) andrequest_proxy
(environment) variable, right? I wanted to test it, but I cleared all settings (so, nohttp_proxy
, no VSCode proxy definition, no proxy setting in thehttpyac.config.js
file, and norequest_proxy
(environment) variable), but I can still make calls that require a proxy and they work just fine. I am wondering if the extension recognizes the default system proxy (mine points to a corporate script that has about 100 lines of code to determine proxy settings based on the endpoint URL), so I doubt that VSCode is that smart, but I cannot explain why it would work when no other proxy definitions are set.Another thing we found was that VSCode also recognizes the
no_proxy
environment variable which messed us badly because on some of our dev systems, it has a setting that holds the company domain, but there are some APIs under the company domain that are hosted externally, so they need to go through a proxy. That's mostly our issue (I'm not sure why our IT did this), but it took us a few hours to figure out that theno_proxy
setting was responsible (I did not see anywhere that VSCode can use it).It would be really helpful, if a clear description of how the proxy settings work.
Beta Was this translation helpful? Give feedback.
All reactions