mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab
MIT License
234 stars 15 forks source link

NO_PROXY is not respected by extension #78

Closed plwalsh closed 4 months ago

plwalsh commented 9 months ago

Describe the bug

In proxy-supported environments, the extension fails to establish a connection to MATLAB, because it is attempting to route its connection to localhost through your proxy host. The extension should be bypassing the proxy for connections to hosts specified in the NO_PROXY environment variable. However, including localhost on the bypass list has no effect.

Related information

It appears that the proxy support for extensions was expanded in 2019 to include support for NO_PROXY: https://github.com/microsoft/vscode/issues/68260.

To Reproduce

Steps to reproduce the behavior:

  1. Set up a proxy server
  2. Set your system environment variables to point to your proxy server
    • HTTP_PROXY=http://proxy.company.com:3128
    • HTTPS_PROXY=http://proxy.company.com:3128
  3. Set your system environment variable to bypass the proxy for locahost
    • NO_PROXY=localhost
  4. Launch VSCode in a MATLAB project workspace
  5. Open a MATLAB script if needed
  6. Watch the extension try to connect to MATLAB
    • image
  7. See the popup message saying that it failed to connect
    • image
    • image

Expected behavior

The MATLAB extension should bypass the proxy and successfully establish its connection to localhost.

Screenshots

See above.

Useful Information

Version: 1.86.0-insider (user setup)
Commit: a017b12b9caa3475675cfe6fda014fcf5af388c9
Date: 2023-12-19T05:37:59.567Z
Electron: 27.1.3
ElectronBuildId: 25612240
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.19045

Additional context

I've already worked with MathWorks support on this issue and they acknowledge the deficiency. They told me they have opened up a formal request to address the problem; however, I wanted to open up this issue so that it is tracked publicly and viewable by all.

meiswjn commented 8 months ago

Hi, we are facing the same issue. Is there any response from the maintainers already? Thanks!

dklilley commented 8 months ago

This is an issue which we are looking into. Unfortunately, we do not have a workaround at this time beyond clearing the HTTP_PROXY and HTTPS_PROXY environment variables.