Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for proxied connections #244

Open
radu-stefan-dt opened this issue Jul 8, 2024 · 1 comment
Open

Support for proxied connections #244

radu-stefan-dt opened this issue Jul 8, 2024 · 1 comment
Labels
feature New functionality

Comments

@radu-stefan-dt
Copy link
Collaborator

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.

@ajoga
Copy link

ajoga commented Aug 13, 2024

+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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

No branches or pull requests

2 participants