coder / code-server

VS Code in the browser
https://coder.com
MIT License
66.47k stars 5.45k forks source link

Specifyiong http_proxy related settings has no effect. #6815

Open JunNakahara opened 1 month ago

JunNakahara commented 1 month ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Launch Code-Server ver 4.12.0 or later.
  2. Open Settings and search proxy.
  3. Find Http: proxy (Aplies to all profiles) sectin in User tab.
  4. Put non-existent proxy server address. i.e. http://unusable.proxy:8888.
  5. Now open Extensions panel, attempt to install any extension.

Expected

Actual

Extensions can be installed successfully without any problem. But it's wrong behavior because code-server shell doesn't respect to http_proxy settings.


At above Step 4, specified Http: Proxy value will be stored in ~/.local/share/code-server/User/settings.json. But ver 4.11.0 or before the settings was listed in Remote tab, and values were stored in ~/.local/share/code-server/Machine/settings.json.

I also noticed that code-server (ver 4.12.0 or later) shell looks still internally referencing those http_proxy related settings in .../Machine/settings.json. I mean if you manually put below to .../Machine/settings.json, code-server will start to fail installing Extensions, expectedly.

{
    "http.proxy": "http://unusable.proxy:8888"
}
CS ver http.proxy in Tab storing settings.json path referencing settings.json
4.11.0 or before Remote ~/.local/share/code-server/Machine/settings.json .../Machine/
4.12.0 to 4.89.1 User ~/.local/share/code-server/User/settings.json .../Machine/

Logs

No response

Screenshot/Video

image image

Does this bug reproduce in native VS Code?

No, this works as expected in native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

Notes

code-asher commented 1 month ago

Thorough debugging! I think this might be an unintentional bug resulting from when they split user settings and remote settings and moved user settings into browser storage. Most likely it will need to be fixed upstream, is my guess.