dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 667 forks source link

Ominisharp does not use proxy settings of vscode #2988

Closed zsynacl closed 5 years ago

zsynacl commented 5 years ago

Issue Description

Ominisharp does not use proxy settings of vscode

Steps to Reproduce

When the C# plugin tries to update ominisharp, it fails to get new version. The PC I'm using is behind an enterprise proxy. I configure proxy settings of vscode as behind:

"http.proxy": "https://127.0.0.1:3128",

and vscode just works well.

Expected Behavior

The C# plugin should use proxy settings from vscode configurations and download updates correctly.

Actual Behavior

The C# plugin fails to download updates.

Logs

OmniSharp log

C# log

Installing C# dependencies... Platform: win32, x86_64 Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)' Retrying from 'https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x64-1.32.11.zip' Failed at stage: downloadPackage Error: read ECONNRESET

Environment information

VSCode version: 1.33.0 C# Extension: 1.18.0

Dotnet Information .NET ������� (2.1.201) Product Information: Version: 2.1.201 Commit SHA-1 hash: 7932dc6179 Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.201\ Microsoft .NET Core Shared Framework Host Version : 2.0.7 Build : 2d61d0b043915bc948ebf98836fefe9ba942be11
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |background|shalldie|1.1.19| |betterdt|Jason|0.3.0| |binary-viewer|momoto|0.0.1| |cmake|twxs|0.0.17| |csharp|ms-vscode|1.18.0| |daily-anime|deepred|1.2.0| |debug|webfreak|0.21.2| |debugger-for-chrome|msjsdiag|4.0.0| |diff-tool|jinsihou|0.0.1| |doxdocgen|cschlosser|0.4.1| |eclipse-theme|tdtp23|0.0.9| |gitblame|waderyan|2.7.0| |Go|ms-vscode|0.9.2| |json2ts|GregorBiswanger|0.0.6| |lex-flex-yacc-bison|faustinoaq|0.0.3| |ocl|martinring|0.1.3| |path-intellisense|christian-kohler|1.4.2| |powershell|ms-vscode|1.12.0| |python|ms-python|2019.3.6352| |rust|rust-lang|0.6.1| |svn-scm|johnstoncode|1.3.1| |theme-panda|tinkertrain|1.3.0| |ts-extension-pack|loiane|0.0.1| |tsimporter|pmneo|1.2.14| |tslint|eg2|1.0.28| |vscode-clangd|llvm-vs-code-extensions|0.0.12| |vscode-great-icons|emmanuelbeziat|2.1.47| |vscode-language-pack-zh-hans|MS-CEINTL|1.33.2| |vscode-todo-highlight|wayou|1.0.4| |vscode-todo-parser|minhthai|1.9.1| |xml|DotJoshJohnson|2.4.0|;
zsynacl commented 5 years ago

I should declare that I know C# plugin uses proxy settings from environment variables. This was discussed in issue #2499 . But due to some reason, I can not set http.proxy systemwide. In this way, I want to restrict the proxy settings enable only inside vscode instead of whole system. So I suppose C# plugin should have the ability to load proxy settings from vscode settings.