Open j-hap opened 2 years ago
This should hopefully be just reqwest's proxy. If I'm correct it works as-is with compiled executables, but since environment variables are not available in WASM, reqwest is not aware of them.
We just manually need to check for these env vars, or in the worst case patch node-fetch
to use a proxy in the extension.
Manually passing the env var seems to be enough for reqwest, this should be fixed in the next version.
Reopening, as it's apparently not this easy under WASM.
Any progress on this issue? Hopefully this issue will be resolved.
Here's a workaround.
tamasfe.even-better-toml-0.19.2
.npm i --no-save undici
in this folder.dist/server.js
. Replace your.proxy
with the address of your proxy. Also refer to the undici docs if your proxy requires authentication.const { ProxyAgent, setGlobalDispatcher } = require("undici");
setGlobalDispatcher(new ProxyAgent("http://your.proxy"));
This only works for VS Code versions since late 2023, because these versions ship with undici's fetch
, and the extension won't use node-fetch
in case there is already a built-in one.
@0f-0b
I got it working fine with that workaround😄 Thank you, very much!
In addition, in the case of WSL or remote SSH connection, it seemed to work if I did the same thing under the .vscode-server
directory of the remote destination.
when behind a company proxy, the vs code extension fails to download the schema catalog
It succeeds when I'm not using the proxy to connect to the internet. I have the http.proxy set in vs code, my powershell profile as well as the environment variables HTTP_PROXY and HTTPS_PROXY, but to no avail.
I saw that one can disable schemas in the settings to skip the time to wait for the request to fail, but it would be nice if the extension would use the proxy defined in the vscode settings to fetch schemas.
Thank you for the extension!