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

Can't easily disable proxy url for remote hosts only #10491

Open
beefster opened this issue Nov 20, 2024 · 3 comments
Open

Can't easily disable proxy url for remote hosts only #10491

beefster opened this issue Nov 20, 2024 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality ssh Issue in vscode-remote SSH

Comments

@beefster
Copy link

beefster commented Nov 20, 2024

The proxy functionality in vscode and the remote extension don't seem to accommodate the case where the dev machine is trapped behind a local proxy and the remote host has no such proxy.

My dev PCs have a corporate-managed locally hosted proxy, which forces outbound traffic to go through their ZScaler Enforcement Node when on their network. I have to set 'http://127.0.0.1:9002' as http proxy in the vscode user settings for many things to work (as well as use win-ca and other workarounds to get extensions to pick up the necessary trusted cert authorities from windows).

I also use these PCs to develop on servers over SSH on a separate network. The local proxy respects that I am not using the organization network and so it does not interfere. However, the remote hosts I'm developing on do not have local proxies and as such I do not want any part of the remote host vscode server instance or its extensions to use this http proxy url, and unfortunately there is no easy way to disable that setting further down than 'user.' It appears I can override it with a different proxy URL but can't set it to "none" and so it inherits the user setting and thus even supercedes the http-proxy environment variables.

So, the vscode server application and its extensions get ' connection refused' errors when they try to send http requests to function since there is no proxy running at that url on that machine. Setting Http: Proxy Support 'off' doesn't seem to resolve this for some extensions, such as copilot.

The only workarounds I can think of are:

  • Continue to manually remove the proxy setting at the user level and re-enable it as needed (sucks)
  • List all hosts needed by vscode itself and its extensions in the 'No Proxy' setting (maybe wouldn't suck if wildcards worked)
  • Remove the proxy setting at the user level, move all of non-remote projects into workspaces, and set it at the workspace level for all of those (insane)
  • Bypass the extension functionality and instead manually invoke the remote vscode server over an ssh terminal so i can pass it the --no-proxy argument (insane).
  • Forward port 9002 as a remote port on the machine in all of my ssh host configs (truly unhinged)

I'm posting this as an issue because the current remote extension's settings interface does not have a way to simply override the user-level http proxy to 'nothing' or avoid inheriting it in the vscode server instance. The vscode server instance honestly shouldn't be inheriting settings specific to the client machine/network like this at all.

@beefster
Copy link
Author

I've realized I can avoid the vscode http-proxy setting altogether and set my http_proxy environment variable on the client machine instead. Still doesn't feel like the best solution...

@vs-code-engineering vs-code-engineering bot added the ssh Issue in vscode-remote SSH label Nov 21, 2024
@joshspicer joshspicer added the feature-request Request for new features or functionality label Dec 10, 2024
@joshspicer
Copy link
Member

ref/ also related to proxy configuration #10521

@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone Dec 10, 2024
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants