Skip to content

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

Closed

Description

@kigawas

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

Activity

  1. kigawas commented on Jul 11, 2019

    @kigawas
    Author

    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)
    
  2. roblourens commented on Jul 13, 2019

    @roblourens
    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?

  3. added
    info-needed
    on Jul 13, 2019
  4. kigawas commented on Jul 13, 2019

    @kigawas
    Author

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

  5. roblourens commented on Jul 14, 2019

    @roblourens
    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.

  6. kigawas commented on Jul 14, 2019

    @kigawas
    Author

    Yes. No.

  7. roblourens commented on Jul 15, 2019

    @roblourens
    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.

  8. kigawas commented on Jul 17, 2019

    @kigawas
    Author

    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.

  9. kigawas commented on Jul 19, 2019

    @kigawas
    Author

    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

  10. kigawas commented on Jul 19, 2019

    @kigawas
    Author

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

    image

  11. roblourens commented on Jul 19, 2019

    @roblourens
    Member

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

  12. kigawas commented on Jul 20, 2019

    @kigawas
    Author

    No, just environment variables

  13. roblourens commented on Oct 15, 2019

    @roblourens
    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.

  14. locked and limited conversation to collaborators on Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    info-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions