Vscode-remote-release: Allow Local Server Download does not use the correct local proxy settings

Created on 25 Nov 2019  路  11Comments  路  Source: microsoft/vscode-remote-release

Both my local and remote machines require connecting to external networks via a proxy.

My local machine (Windows 10) is configured to use a PAC file to access the proxy settings. VS Code appears to use this correctly when installing extensions locally, so I want to use Allow Local Server Download to avoid configuring the proxy settings for vscode remote.

It appears Allow Local Server Download does not use these settings when it gets a request to download something on the client.

Version: 1.41.0-insider (user setup)
Commit: abbf52b1378e2976803f81b1317fe3a5e6e39c23
Date: 2019-11-25T10:20:07.524Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.14393

The failing setup log is as follows:

[16:08:33.242] [email protected]
[16:08:33.242] win32 x64
[16:08:33.244] SSH Resolver called for "ssh-remote+lhs", attempt 1
[16:08:33.245] SSH Resolver called for host: lhs
[16:08:33.245] Setting up SSH remote "lhs"
[16:08:33.317] Using commit id "abbf52b1378e2976803f81b1317fe3a5e6e39c23" and quality "insider" for server
[16:08:33.318] Testing ssh with C:\Windows\System32\OpenSSH\ssh.exe -V
[16:08:33.391] ssh exited with code: 0
[16:08:33.391] Got stderr from ssh: OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.4
[16:08:33.398] Using SSH config file "c:\Users\lpetre\.ssh\config"
[16:08:33.398] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 52747 -F c:\Users\lpetre\.ssh\config lhs bash
[16:08:33.403] Install and start server if needed
[16:08:33.405] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:08:33.703] > 
[16:08:33.704] Got some output, clearing connection timeout
[16:08:34.956] > cacde26d0f14: running
> 
[16:08:34.990] > Acquiring lock on /home/lpetre/.vscode-server-insiders/bin/abbf52b1378e2976803f81
> b1317fe3a5e6e39c23/vscode-remote-lock.abbf52b1378e2976803f81b1317fe3a5e6e39c23
> Installing to /home/lpetre/.vscode-server-insiders/bin/abbf52b1378e2976803f81b131
> 7fe3a5e6e39c23...
> Downloading with wget
> 
[16:08:35.697] > Acquiring lock on /home/lpetre/.vscode-server-insiders/bin/abbf52b1378e2976803f81b1317fe3a5e6e39c23/vscode-remote-lock.abbf52b1378e
> 2976803f81b1317fe3a5e6e39c23
> Installing to /home/lpetre/.vscode-server-insiders/bin/abbf52b1378e2976803f81b1317fe3a5e6e39c23...
> Downloading with wget
> 
> 
[16:08:42.202] > wget download failed
> failed: Connection timed out.
> USER=lpetre
> PWD=/home/lpetre/.vscode-server-insiders/bin/abbf52b1378e2976803f81b1317fe3a5e6e39c23
> HOME=/home/lpetre
> VSCODE_AGENT_FOLDER=/home/lpetre/.vscode-server-insiders
> Trigger client server download
[16:08:42.220] > 
> VSCODE_ARCH==x64==
> cacde26d0f14__trigger_vscode_server_download__
> Waiting for client to transfer server archive...
> Waiting for /home/lpetre/.vscode-server-insiders/bin/abbf52b1378e2976803f81b1317fe3a5e6e39c23/vscode-scp-done.flag and vscode-serve
> r-linux-x64.tar.gz to exist
> 
[16:08:42.220] Got request to download on client for x64
[16:08:42.435] Resolver error: Failed to download VS Code Server: HTTP 407 - Proxy Authentication Required
[16:08:42.436] ------

The remote wget failure is expected. The local Proxy Authentication failure is the problem. I don't get local proxy problems when installing extensions (ie installing the nightly remote-ssh extension worked flawlessly).

bug ssh verified

All 11 comments

@chrmarti aren't the proxy settings supposed to be applied in the extension host automatically somehow? Is that not the case?

I'm here from #2002 .

Would the local system default proxy settings not be respected? I have no issues downloading extensions (for example) within VScode. As per #2002, where remote-ssh console output is included, I believe the target server is the client performing the download, so it appears the setting is not being respected. I can verify this with a tcpdump on Monday.

We are still missing support for proxy authentication. This is due to lack of support for credentials in the Electron API. The general tracking issue is https://github.com/microsoft/vscode/issues/12588.

Oh, so that means I can't support this fully in the local EH? Or is there a workaround?

I think the '_workbench.downloadResource' command has been used as a workaround by other extensions. That goes through the Chromium network implementation.

Just so this is clear, and apologies if it is clear... I absolutely believe that the remote system, for which I am connecting with remote-ssh, is the system performing the download; that remote.SSH.allowLocalServerDownload is not being honored. I'll check it out tomorrow.

This has nothing to do with support for proxy auth.

As i expected, tcp/443 traffic dst 104.42.72.153 (block owned by MSFT) from the target remote-ssh server:

image

Is this enough proof that the extension is not properly honoring the remote.SSH.allowLocalServerDownload setting?

@mbrownnycnyc then you have a different issue, please open a new issue with the log

@roblourens you're kidding? You closed #2002 as a duplicate of this issue. Reopen it and let's pursue a solution over there instead of bouncing around and NOT solving the problem or.even investigating.

I am using remote-ssh to edit files that are used in config distribution (specifically splunk deployment server). It speeds up this work massive amounts versus using vim. Instead of leaving VScode for another solution, I'd like to get this figured out. Thanks

To conform to the game, I've opened a new issue (#2085), so this gets raised, with the exact contents in the other issue I created previously (#2002), appending the tcpdump proof.

Leave #2002 closed and let's progress #2085 in context.

Thanks @roblourens and @chrmarti ! I can confirm this is working in version 2019.12.44160

Was this page helpful?
0 / 5 - 0 ratings