Skip to content
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

Handle Proxy Issues on Remote #231

Closed
modbw opened this issue May 8, 2019 · 18 comments
Closed

Handle Proxy Issues on Remote #231

modbw opened this issue May 8, 2019 · 18 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan
Milestone

Comments

@modbw
Copy link

modbw commented May 8, 2019

  • VSCode Version: 1.34.0-insiders (user setup)
  • Local OS Version: Windows 10 1703 Enterprise
  • Remote OS Version: Debian GNU/Linux 8
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Create a remote SSH session
  2. Try to install any extension (tested ms-vscode.cpptools, cschlosser.doxdocgen, twxs.cmake)

image

After creating the remote connection I try to install an extension which results in the above notifications.

@egamma egamma added info-needed Issue requires more information from poster and removed info-needed Issue requires more information from poster labels May 8, 2019
@sandy081
Copy link
Member

sandy081 commented May 8, 2019

Can you please try installing again and share us the remote server logs. You can find them by running the command

F1 -> View -> Log (Remote Server)

@sandy081 sandy081 added the info-needed Issue requires more information from poster label May 8, 2019
@modbw
Copy link
Author

modbw commented May 9, 2019

[2019-05-08 13:00:53.810] [remoteagent] [info] Scanned user extensions: 0\n
[2019-05-09 07:49:47.892] [remoteagent] [info] Scanning extensions using UI language: en
[2019-05-09 07:49:47.914] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:49:47.919] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:49:47.928] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:49:47.996] [remoteagent] [info] Scanned system extensions: 24
[2019-05-09 07:49:48.002] [remoteagent] [info] Scanned system extensions: 24
[2019-05-09 07:49:48.680] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:50:06.412] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:50:06.414] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:50:06.428] [remoteagent] [info] Scanned system extensions: 24
[2019-05-09 07:50:06.537] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:50:06.552] [remoteagent] [info] Scanned system extensions: 24
[2019-05-09 07:50:17.597] [remoteagent] [info] Installing extension: twxs.cmake
[2019-05-09 07:50:17.793] [remoteagent] [info] Scanned user extensions: 0
[2019-05-09 07:50:18.297] [remoteagent] [error] Failed to install extension: twxs.cmake unable to verify the first certificate 

Seems to be a certificate problem with our company proxy. Is it possible to disable certificate checking for VSCode remote extension installing?

Setting "http.proxyStrictSSL": false in the remote workspace settings.json didn't help.

@sandy081 sandy081 changed the title SSH: Cannot install any extension Handle Proxy Issues on Remote May 9, 2019
@sandy081
Copy link
Member

sandy081 commented May 9, 2019

Yeah this is known proxy issues and above settings will not help on remote.

@chrmarti How can we handle the proxy issues on remote given that we do not have access to electron?

@sandy081 sandy081 added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels May 9, 2019
@sandy081 sandy081 added this to the May 2019 milestone May 9, 2019
@chrmarti
Copy link
Contributor

chrmarti commented May 9, 2019

Certificates should be picked up from the remote OS. One issue is that the remote extension host picks up the proxy configuration from the host OS (#213).

@modbw Do you have all relevant certificates installed on the remote machine you SSH into?

@sandy081
Copy link
Member

sandy081 commented May 9, 2019

@chrmarti This is not remote ext host.. this is remote ext management not sure if we do same w.r.to proxies

@modbw
Copy link
Author

modbw commented May 9, 2019

@chrmarti Certificates should be installed OK as tests with curl and wget shows. If there is anything I can test additionally let me know.

@chrmarti
Copy link
Contributor

chrmarti commented May 9, 2019

@sandy081 Then we don't load the credentials from the OS. Wouldn't that be the same with the local extension management? We should look into bringing that on par with the extension hosts.

@sandy081
Copy link
Member

sandy081 commented May 9, 2019

Local extensions management is an electron process which uses chromium network stack. We cannot bring them on par unless we also use electron on remote which we do not want.

Other solution which is in the plate from beginning is to stream installation from local to remote. It means download it on renderer and stream it to remote.

@chrmarti
Copy link
Contributor

chrmarti commented May 9, 2019

Got it. So one other direction would be to reuse the proxy and certificates code I've written for the extension host in proxyResolver.ts for the remote extension management.

@sandy081
Copy link
Member

yeah makes sense

@aldanor
Copy link

aldanor commented May 23, 2019

Same problem here; company proxy with internal certificates, leading to a 'unable to get local issuer certificate'. Would be nice if it was possible to configure this properly for the remote side (both the proxy and certs, in case they can't be properly picked up automatically). Plus, an option to ignore certificate validation for the remote side.

@EmbeddedBacon
Copy link

EmbeddedBacon commented Jun 7, 2019

Recently update to VSCode 1.35.0. Attempted to install a few extensions as noted by other users. I am running VSCode on Windows 10 and ssh into a CentOS box. I do have the proxy configuration (i.e., "http:proxy" set so extensions, mainly CPP Tools, can be installed properly.

Would it be possible for VSCode to picked up the proxy, if set, on the local side and use them on the connecting side?

@EmbeddedBacon
Copy link

Perhaps outside the scope of this item, but will VSCode be able to install the extension I enabled on the host side (local) to the remote side automagically? I am wondering if I will need to install the extension each time connecting to the remote machine. I am not sure this is the case since I can't install any extensions at the moment.

@kmalloc
Copy link

kmalloc commented Jun 10, 2019

same problem here with 1.35.0, extension for remote can not be installed.

image

my remote host is behind a proxy.

@sandy081 sandy081 added verification-needed Verification of issue is requested and removed verification-needed Verification of issue is requested labels Jun 18, 2019
@EmbeddedBacon
Copy link

EmbeddedBacon commented Jul 3, 2019

I know this topic is close, but VSCode 1.36 just came out and Remote-SSH also updated. I retried setting up a remote editing session then tried to install the C/C++ extension. It did download and install correctly. Even went through the C/C++ insiders updating. Thanks for getting this to work. Now, just need to start editing files and see if the rest of it works.

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Linux / x86_64)' (8529 KB)  Done!
Downloading package 'ClangFormat (Linux / x86_64)' (812 KB)  Done!
Downloading package 'Mono Framework Assemblies' (5368 KB)  Done!
Downloading package 'Mono Runtime (Linux / x86_64)' (1862 KB)  Done!

Installing package 'C/C++ language components (Linux / x86_64)'
Installing package 'ClangFormat (Linux / x86_64)'
Installing package 'Mono Framework Assemblies'
Installing package 'Mono Runtime (Linux / x86_64)'

Finished installing dependencies

IntelliSense Engine = Tag Parser.
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
File exclude: **/.git
File exclude: **/.svn
File exclude: **/.hg
File exclude: **/CVS
File exclude: **/.DS_Store
File exclude: **/.vscode
Search exclude: **/node_modules
Search exclude: **/bower_components
Search exclude: **/.vscode
Code browsing service initialized
  Folder: /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/ will be indexed

Edit: I have noticed that I keep getting the C/C++ Extension has been updated notification even after I press the button to reload.

@kmalloc
Copy link

kmalloc commented Jul 5, 2019

I am still experiencing the same issue after upgraded to 1.36, remote-ssh:0.44

image

image

@sandy081
Copy link
Member

sandy081 commented Jul 5, 2019

This issue is about downloading extensions and what you are seeing is downloading the server. Can you please file a separate issue and let us know which remote extension are you using?

@heiwais25
Copy link

@kmalloc In my case, I could solve that issue by adding http_proxy in the ~/.wgetrc file in the server. What I did in the ~/.wgetrc is like this.

user_proxy=on
http_proxy=<proxy address>
https_proxy=<proxy address>
ftp_proxy=<proxy address>

I hope it could help you

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

No branches or pull requests

8 participants