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

Should not forward local proxy settings to remote ssh server #957

Closed
kigawas opened this issue Jul 11, 2019 · 12 comments
Closed

Should not forward local proxy settings to remote ssh server #957

kigawas opened this issue Jul 11, 2019 · 12 comments
Labels
info-needed Issue requires more information from poster

Comments

@kigawas
Copy link

kigawas commented Jul 11, 2019

TL;DR: You can work it around by code --no-proxy-server

  • VSCode Version: 1.36.1
  • Local OS Version: Centos 7.5
  • Remote OS Version: Ubuntu 18.04
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Set local proxy in ENV (export http_proxy)
  2. Install crates extension
  3. Open any Cargo.toml file in a remote rust project
  4. Crates will print errors in console (Developer: Toggle developer tools)

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

@kigawas
Copy link
Author

kigawas commented Jul 11, 2019

Local proxy settings

https_proxy=http://proxy.example.com:8080
http_proxy=http://proxy.example.com:8080
no_proxy=localhost,127.0.0.1,::1

Remote error logs

console.ts:134 [Extension Host] RequestError: Error: getaddrinfo ENOTFOUND proxy.example.com proxy.example.com:8080
	at new RequestError (/home/kigawas/.vscode-server/extensions/serayuzgur.crates-0.4.3/node_modules/request-promise-core/lib/errors.js:14:15)
	at Request.plumbing.callback (/home/kigawas/.vscode-server/extensions/serayuzgur.crates-0.4.3/node_modules/request-promise-core/lib/plumbing.js:87:29)
	at Request.RP$callback [as _callback] (/home/kigawas/.vscode-server/extensions/serayuzgur.crates-0.4.3/node_modules/request-promise-core/lib/plumbing.js:46:31)
	at self.callback (/home/kigawas/.vscode-server/extensions/serayuzgur.crates-0.4.3/node_modules/request/request.js:185:22)
	at Request.emit (events.js:182:13)
	at Request.onRequestError (/home/kigawas/.vscode-server/extensions/serayuzgur.crates-0.4.3/node_modules/request/request.js:881:8)
	at ClientRequest.emit (events.js:187:15)
	at onerror (/home/kigawas/.vscode-server/bin/2213894…/node_modules/agent-base/index.js:100:9)
	at callbackError (/home/kigawas/.vscode-server/bin/2213894…/node_modules/agent-base/index.js:122:5)
	at process._tickCallback (internal/process/next_tick.js:68:7)

@roblourens
Copy link
Member

I don't quite understand what's going on, is crates trying to access a local server and not seeing no_proxy? Otherwise why shouldn't it get the proxy settings?

@roblourens roblourens added the info-needed Issue requires more information from poster label Jul 13, 2019
@kigawas
Copy link
Author

kigawas commented Jul 13, 2019

Crates use the proxy server set locally, but remote server cannot get access to the proxy server.

@roblourens
Copy link
Member

I'm not sure how that's possible. Are those set as environment variables? If you enter echo $https_proxy in a remote vscode terminal do you see those values? I want to make sure that they are not actually in the remote environment.

@kigawas
Copy link
Author

kigawas commented Jul 14, 2019

Yes. No.

@roblourens
Copy link
Member

Hm. They must still be set in your remote environment anyway. vscode does not copy them over. Otherwise this is an issue for the crates extension which seems unlikely too.

@kigawas
Copy link
Author

kigawas commented Jul 17, 2019

@roblourens Not possible since remote environment has nothing to do with local. And crates extension has no reason dealing with environment, not sure but perhaps it's related with request-promise package used by crates.

@kigawas
Copy link
Author

kigawas commented Jul 19, 2019

@roblourens Not only crates, I can also reproduce this bug on vscode-lldb when downloading lldb binaries. You can check their code here.

For reproducing the bug, check the instruction here and start debugging, it will ask you to download package, then it stuck.

image

@kigawas
Copy link
Author

kigawas commented Jul 19, 2019

@roblourens
And the same phenomenon happened on vscode-lldb can also be worked around by code --no-proxy-server.

image

@roblourens
Copy link
Member

Oh, so did you set any vscode proxy settings like http.proxy?

@kigawas
Copy link
Author

kigawas commented Jul 20, 2019

No, just environment variables

@roblourens
Copy link
Member

Still no idea what the problem is. I don't think it's possible that vscode is copying these properties to the remote environment.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants