microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.28k stars 28.89k forks source link

Help Wanted: Test new networking stack #22214

Closed joaomoreno closed 7 years ago

joaomoreno commented 7 years ago

If you were pinged to this thread, it's because you helped out in #18103.

With #21879, all network communication was moved to the Chrome's network stack. We'll try to fix the proxy issues over that layer, instead of having two layers.

The latest Insiders release is already out, please give it a try:

Please check whether you can:

  1. Browse extensions
  2. Install extensions

If stuff fails, please open the dev tools (F1, Developer Tools), try again and check the Network tab for failing requests.

Note: The http.proxy and http.proxyStrictSSL settings are ignored in this build, it doesn't matter what you put in there. The proxy settings are automatically picked up from your system's configuration. So, if stuff fails, the first thing you can check if whether your system is correctly configured to use your proxy.


@dfroze @akcorp2003 @fazouane-marouane @ywmail @abargstaedt @liaoya @R3V07T @hbuckle @ocean @joewood @martinmcwhorter @critesjm @dotalchemy @Jule- @diggamies @Efluminor @egamma @the-shank @raphabi @ununseptium @Platzer @williamchang @rfc791 @iamitava @ramdacxp @jrieken @abdinfos @ericc4 @lcrok @wiz @Harpagon @equinoxel @sattlt @nassoman @jithurjacob @sebastienraillet @rafaelcneves @FloMaetschke @JesusSerranoGL @kad @roblourens @leonibr @eolandezhang @xapienz @temurphy @atierant

joaomoreno commented 7 years ago

@wiz @FloMaetschke We can add some sprinkles on top of everything 🌸 to detect that HTTP_PROXY env var.

@wiz But in your case, if you have configured your system... it should have picked up the settings. Which OS are you on?

dpwiz commented 7 years ago

Ubuntu 16.04. I have a global proxy set up and a chrome policy in /etc/opt/chrome/policies/managed/proxy.json to use same localhost/cntlm proxy.

joaomoreno commented 7 years ago

@wiz Like here?

image

dpwiz commented 7 years ago

@joaomoreno yeah. with http and socks proxies set.

dpwiz commented 7 years ago

Hmm.. I've added the socks proxy and code-insiders now appear to work without command line proxy argument.

upd: Whoa now! Even release started to work. Magic of socks I'd guess.

joaomoreno commented 7 years ago

@wiz 🤘

FloMaetschke commented 7 years ago

@joaomoreno is your vscode version with username / password dialog already an insiders-build ?

joaomoreno commented 7 years ago

Nah man, it'll take a while. Busy busy.

ocean commented 7 years ago

I'm on Mac and have an authenticated corporate proxy with an internal self-signed certificate.

I've tried the latest Insiders build (today's version) and I cannot connect to the marketplace to browse extensions, install extensions or check for program updates.

I have tried with the --proxy-server command line parameter set, and without.

I get exactly the same net::ERR_TUNNEL_CONNECTION_FAILED error as FloMaetschke does here.

I assume this is because my authenticated proxy requires #22369 😃

Thanks for the progress @joaomoreno, keep going! 👍

SQLDBAWithABeard commented 7 years ago

Hi,

Invited here by Sean McBreen as was having the issues installing extensions as mentioned here.

The insider build allowed me to install extensions but after installing the mssql extension. I got this error

Initializing SQL tools service for the mssql extension. Note: mssql commands will be available after installing the service.

Platform: win32, x86_64 (Windows)

Installing SQL tools service to C:\Users\XXXXXXXXXXX.vscode-insiders\extensions\ms-mssql.mssql-0.3.0\sqltoolsservice\0.3.0.5\Windows. Downloading https://download.microsoft.com/download/A/A/2/AA22B2D6-94D8-4C82-A388-D0246F567BBF/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip [ERROR] Error: Request error: ETIMEDOUT

As I had already gone through the process of manually downloading and installing I was able to copy the files and all was well

FloMaetschke commented 7 years ago

any update so far?

diev commented 7 years ago

This version (for Windows) has solved my #23166 after I had seen in Developer Tools many undocumented requests to https://*.vsassets.io/* (our corporate proxy has white lists of allowed domain urls for every job - please write your VS Code url requirements somewhere for attention of proxy admins and CISO!).

Yes, I can:

  1. Browse extensions
  2. Install extensions

with common IE proxy settings set by GPO, where same IP:3128 for every protocol.

jgrumboe commented 7 years ago

Hi, tried insider version 1.11.0 from today running on RHEL7 and i have to report the following:

  1. setting proxy as environment and/or settings.json didn't work - still direct TCP connections to internet hanging in SYN_SENT
  2. starting code-insider with "--proxy-server=http://proxy.server:8080" did help! woohoo! I can browse/install extensions and check for updates.

Strangly when i check with "netstat -tnp|grep code" for TCP connections there are still some SYN_SENT to 40.77.226.250:443.

Can i be any more help for a final solution? Regards, Johannes

jgrumboe commented 7 years ago

Just tried it with official code 1.10.2 and "--proxy-server" and extensions browsing is also working under RHEL7 now. Installing extensions is broken.

ocean commented 7 years ago

Hi @joaomoreno I see your PR for this feature ( #22369 ) has passed the CI tests (4 days ago), does that mean it will be in the Insiders build soon for us to test?

diev commented 7 years ago

Somedays our admins had problems to pass the Windows Updates through our corporate proxy, after our WSUS got died. These problems were solved with

netsh.exe winhttp import proxy source=ie

May it be a better way than to write the settings for every application?

danielbarla commented 7 years ago

I'm using release build 1.11.2, and I'm getting an issue that's essentially explained by the note above:

Note: The http.proxy and http.proxyStrictSSL settings are ignored in this build, it doesn't matter what you put in there. The proxy settings are automatically picked up from your system's configuration.

I was just about to log a separate issue for this, when I ran across this topic.

Is http.proxy supposed to be ignored in the current release version? It certainly seems to be the case now, and I'm pretty sure it wasn't happening in previous builds. Can confirm that VS Code is following Chrome's implementation, i.e. changing the system proxy instantly takes effect in VS Code (we're running Cntlm in -f -v mode to observe it being hit - we haven't been able to make http.proxy have any effect lately).

FloMaetschke commented 7 years ago
Extension Author Version
angular1-code-snippets alexandersage 0.0.3
githistory donjayamanne 0.2.0
KillTasksButton dtrajano 0.0.4
output-colorizer IBM 0.1.0
latex-workshop James-Yu 2.1.4
color-highlight naumovs 2.1.2
material-icon-theme PKief 2.0.4
Material-theme zhuangtongfa 2.4.17 ;

Steps to Reproduce:

  1. Start vscode without cli parameters and open extensions panel.
  2. Search for new extenions.

image

Search not working, no results. Request fails.

I was able to get it working with fiddler4.

Steps to Reproduce:

  1. Start vscode with cli parameter: --ignore-certificate-errors

  2. Open extensions panel and search for new extenions.

How long until i can enter proxy credentials in a form from vscode on first connect? Please include an option to ignore certificate and to save this settings.

odulkanberoglu commented 7 years ago

After installing version 1.11.2, extension downloads function correctly. However after installing C/C++ extension and restarting VS Code, following output is observed on Output window. This is the exact HTTP error code I have been observing for extension downloads prior to this version.

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed at stage: downloadPackages
failed (error code '401')

Finished
opticyclic commented 7 years ago

I can confirm that using 1.12.0 the issue reported here https://github.com/Microsoft/vscode/issues/7140 has now been resolved and I can browse and install extensions.

Windows with a corporate firewall configured with a pac.

martinmcwhorter commented 7 years ago

I can confirm I am still having this issue trying to access the marketplace through a corporate proxy

VSCode: 1.12.1 OS: Windows 7 Proxy configured through PAC.

When I try to access @recommended extensions I get this in the debug console:

image

I have deleted all of my proxy config settings from VSCode, exited and restarted VSCode I get the same result.

If I only delete the first line, and leave in the second line of the config:

//"http.proxy": "http://<user>:<pass>@<proxyhost>:<port>",
"http.proxyStrictSSL": false,

It still does not work. I get the same result.

akcorp2003 commented 7 years ago

Currently on Mac OSX Sierra 10.12.5, VS Code 1.12.2, I am able to search for extensions now, however, the thumbnails do not appear and if I click on "install," I get an error message.

screen shot 2017-05-31 at 2 09 05 pm
ywmail commented 7 years ago

Please add no.proxy setting support. Some extensions honour vscode's http.proxy setting, but some network requests from these extensions like testing local APIs, should not go through proxy.

I'm using this extension: REST Client humao.rest-client I can send request to github.com, like:

GET https://github.com/ HTTP/1.1
content-type: application/json

But I can't send request to local APIs when http.proxy is set.

GET http://127.0.0.1:18081/api/test / HTTP/1.1
content-type: application/json

remove the http.proxy setting is OK to send the request.

HolyGeneralK commented 7 years ago

Seconded on the no.proxy or http.noproxy support (or at least make sure that we can use a system setting). If you'd like me to create a new issue and link it here I can. I would be able to do some limited testing if needed.

joaomoreno commented 7 years ago

Thanks for all the help people!