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

VSCode Doesn't Automatically Use System Proxy #7140

Closed
opticyclic opened this issue Jun 2, 2016 · 11 comments
Closed

VSCode Doesn't Automatically Use System Proxy #7140

opticyclic opened this issue Jun 2, 2016 · 11 comments
Assignees
Labels
feature-request Request for new features or functionality proxy Issues regarding network proxies
Milestone

Comments

@opticyclic
Copy link

  • VSCode Version: 1.1.1
  • OS Version: Windows 7

Steps to Reproduce:

  1. Install VSCode behind a firewall configured via a pac file
  2. Try to install a C# extension
  3. Fail
  4. Uninstall and use something else

The system admin has disabled the settings in IE via Group Policy so I can't work out what the pac is and as such can't work out the proxy to put in the config.

VSCode should just use the system proxy settings by default and ask for a username/password if necessary.
There should still be manual options for proxies in the config, however, it would also be useful for someone to have the option to specify a pac file too if for some reason the auto detection doesn't work.

@rebornix
Copy link
Member

rebornix commented Jun 3, 2016

AFAIK, pac file will only proxy requests whose domain is on the list and I suspect our marketplace is not listed, in this case our requests are not going through your proxy. Can you help make sure you can access following three urls in IE ?

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

If those urls are accessible and we do not detect system proxy, then it's a valid request.

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Jun 3, 2016
@joaomoreno joaomoreno added this to the Backlog milestone Jun 3, 2016
@KeithBallard
Copy link

I am just chiming in on this to suggest that if PAC files are supported, it would be useful to support WPAD files as well for automatic proxy detection. I don't know if this is so much a bug as a feature suggestion (but that is up to you guys).

@joaomoreno joaomoreno added feature-request Request for new features or functionality proxy Issues regarding network proxies and removed bug Issue identified by VS Code Team member as probable bug labels Jul 6, 2016
@stanleyxu2005
Copy link

stanleyxu2005 commented Jul 8, 2016

AFAIK, Windows application access Internet using WinInet.dll. If we look into the MSDN page, there are four types of access type:

  • INTERNET_OPEN_TYPE_DIRECT
  • INTERNET_OPEN_TYPE_PRECONFIG
  • INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
  • INTERNET_OPEN_TYPE_PROXY

I guess VSCode (and most Electron based webapp) connects to Internet with INTERNET_OPEN_TYPE_DIRECT. What @opticyclic says is that, we want VSCode uses INTERNET_OPEN_TYPE_PRECONFIG.

I do think this feature might also be requested to Nodejs and Electronjs community as well.

@joaomoreno
Copy link
Member

joaomoreno commented Jul 8, 2016

Finally someone who knows how the sausage gets made. Thanks for the info @stanleyxu2005.

@ghost
Copy link

ghost commented Oct 14, 2016

I have the same issue since few days and only in Code - Insiders.

All 3 URL's are accessible in Chrome browser.

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

191.238.172.191 forwards to https://markedplace.visualstudio.com while 191.238.172.191:443 cause a timeout. I informed our network team, and they told that neither our proxy nor our firewall blocks any network request to 191.238.172.191:443

When I try 191.238.172.191:443 on my iPhone it tells me that Certificate Error - The identity of https://191.238.172.191/ can't be verified and only on pressing the continue button in Safari I get forwarded to https://marketplace.visualstudio.com

@jankap
Copy link

jankap commented Feb 10, 2017

Got the same problem here in our company network with version 1.9.1
Is the IP address hardcoded in VSC or the domain? I did not have troubles browsing to the domain directly, but extensions cannot be loaded because of "connect ECONNREFUSED 191.238.172.191:443"

@gritts1
Copy link

gritts1 commented Feb 13, 2017

Same issue as posted earlier using version 1.9.1... "ECONNREFUSED 191.238.172.191:443". If I test the URL's posted previously I get the following:

https://marketplace.visualstudio.com/_apis/public/gallery - Results in a 404 error
https://vscode.blob.core.windows.net/gallery/index - appears to work fine
https://marketplace.visualstudio.com/items - Results in a 404 error.

To verify this is not something related to my work network, I attempted to connect to the same URLs through my cell phone. The same results appeared.

@jankap
Copy link

jankap commented Feb 17, 2017

For your information: Using the key ""http.proxy":"http://username@ip:port" in user settings does work for me without entering a password (got authenticated before by Windows).

So all works as expected for me now, thanks

@AbhishekTripathi
Copy link

AbhishekTripathi commented Mar 24, 2017

I am still facing this issue. The URL 191.238.172.191:443 doesn't resolve

Version 1.10.1
Commit 653f8733dd5a5c43d66d7168b4701f94d72b62e5
Date 2017-03-02T00:33:15.706Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

@crewshin
Copy link

Same issue on OSX

@joaomoreno
Copy link
Member

Actually, Code now uses the system proxy settings. Which doesn't mean that proxy issues are fixed for every one. More in #22214

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 proxy Issues regarding network proxies
Projects
None yet
Development

No branches or pull requests

9 participants