Skip to content

Respect proxies #78

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

Closed
bpmct opened this issue Apr 11, 2023 · 4 comments
Closed

Respect proxies #78

bpmct opened this issue Apr 11, 2023 · 4 comments

Comments

@bpmct
Copy link
Member

bpmct commented Apr 11, 2023

I thought there was an issue for this, but it seems like there is not? How can the VS Code extension work with HTTP_PROXY, etc

@ericpaulsen
Copy link
Member

ericpaulsen commented May 5, 2023

@bpmct @rodrimaia i'm running Coder Remote v0.1.18 and VS Code 1.77.3, with the http_proxy set to http://google.com.

i am correctly getting self-signed certificate errors when this env var is set, and successful connections when unset. the extension appears to respect the configured proxy.

Screenshot 2023-05-04 at 9 47 12 PM

@rodrimaia
Copy link
Contributor

@ericpaulsen thank you for your comment. Your results match what I have been testing too.

I conducted local tests using the tinyproxy proxy to confirm there are no errors with the extension interaction.

  1. The coder extension adheres to the same proxy settings used by VSCode itself. Users can customize this behavior through the VSCode user preferences, where the default option is set to "override.":
    image

  2. There are three methods to configure the VSCode proxy:
    a. Launching VSCode with the http_proxy environment variable.
    b. Modifying the proxy settings within the user preferences section.
    c. Allowing VSCode to automatically inherit proxy settings from the operating system.

In all cases, the coder extension effectively utilized the same proxy as VSCode.

I could not figure out why some users faced those network/connectivity errors in the past.

@bpmct do you see anything else that can be run/tested to improve this issue clarification?

@bpmct
Copy link
Member Author

bpmct commented May 8, 2023

Nice. Thanks for investigating, this gives me a lot of peace-of-mind about how Coder works in enterprise environments. If this comes up frequently from customers, we could document in the README or in our product docs, but for now we can link to this issue :)

I'm curious why in this case, one proxy/certs error was resolved? Did we make changes in this area between versions?

#84 (comment)

But yeah, I think we're good to close.

@tiaden1
Copy link

tiaden1 commented May 29, 2023

@bpmct, @rodrimaia, I'm having the same issue. Our root certificate is a corporate root certificate that is installed in every user Windows 10 environment. Thus it's trusted by Google chrome but when used inside vscode for coder CLI auth, I get the error below. I tried everything. From setting the proxy to override to the use of the NODE_EXTRA_CA_CERTS environment variable.
The only thing that works is setting the environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0 in order to bypass certificate verification. However as we all know, this is not secure.
Screenshot 2023-05-29 at 6 48 14 PM

@bpmct bpmct closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants