Support for proxied connections
radu-stefan-dt opened this issue · 1 comments
Summary
Our users have had partial success with proxied connections. Currently the guidance is to use HTTP_PROXY
/HTTPS_PROXY
environment variables or VSCode's built-in settings for proxies. None of these options have been thoroughly tested with the extension and it's not clear if they work.
Details
As part of this feature, we should test the environment variables & settings and if successful, include them in the documentation as a repeatable set of instructions.
If the built-in mechanisms don't work, we should look at reading these settings/variables inside the extension and explicitly creating a proxy configuration that can be passed into the Axios client.
+1 on the feature request, I would also suggest you add support and tests for no_proxy/NO_PROXY environment variables.
Also, running in remote environment with proxies, not only locally with vscode.
The person working on this might want to read this nice summary of the support of the different variable names: https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/
In my environment, we have HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy set to the same value. The DT extension fails with an http/400 error when trying to get the /api/v1/time
endpoint, however a curl
succeeds.
When I unset
my no_proxy
and NO_PROXY
environment variables, then I can't curl
the /api/v1/time
endpoint anymore.
It seems the DT extension uses the proxy setting variables, but ignores the no_proxy/NO_PROXY environment variables: it tries to get the endpoint through the proxy which is not allowed for us.
[the rationale is likely that we have an internal managed Dynatrace that doesn't need our machines to reach the internet proxy].
I also suspect the DT extension fails to authenticate to the proxy: indeed it reports an HTTP/400 when my failing curl
gets an http/403 instead
Edit: I striked some statement I could disprove after some more debugging: no_proxy/NO_PROXY environment variables are used by the DT extension. For other readers trying to make this work, I recommend you look at the environment variable set for the code-server
with cat /prod/[PID OF code-server]/environ