Proxy parameters are ignored and user-settings are missing a proxy-bypass option
See original GitHub issueIssue Type
Bug
Description
@joaomoreno mentioning you here as discussed in https://github.com/Microsoft/vscode-docs/pull/1069
Steps to reproduce
- Start VSC using
code --proxy-server="myproxy:8080" --proxy-bypass-list="*.someinternaldomain" --ignore-certificate-errors
- Make sure in the user settings the options
http.proxy
andhttp.proxyStrictSSL
are not set.
Expected outcome: VSC should use the proxy myproxy:8080 for ALL protocols except when connecting so any subdomain on .someinternaldomain. Also it should ignore any SSL errors. This should be true for all VSC parts that require networking and all plug-ins that do so.
Actual outcome: All submitted cmd parameters seem to be ignored atleast for parts of VSC.
Observed behaviour: Create a JSON-Schema that is referencing both a public URL and an internal URL, e.g.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"something": {
"$ref": "https://repo.someinternaldomain/some-internal-schema.json"
}
}
}
where some-internal-schema.json can be an blank JSON such as
{}
VSCode will then try to resolve both: the internal and the public domains. Given the cmd params we used to start VSC both should work. But actually what I get is
Unable to load schema from 'repo.someinternaldomain'. Error: self signed certificate in certificate chain
Testing further, I set the option "http.proxyStrictSSL" : false
in the VSC user settings, the certificate error now is replaced by the following error:
Unable to load schema from 'http://json-schema.org/draft-07/schema': Unable to connect to http://json-schema.org/draft-07/schema. Error: connect ECONNREFUSED 127.0.0.1:80
Note that on the same system I am able to visit json-schema.org without any issues using the same proxy configuration. This can be also tested when setting "http.proxy": "http://myproxy:8080"
in the user settings. Then the error will go away.
Now public connections are working just fine but the internal connections will still not work because --proxy-bypass-list
, just like all the other cmd parameters seems to be ignored.
So the issue is:
- chromium proxy parameters as shown above are ignored by some parts of VSC (used for JSON schema validation). Note that this also happens with
code --disable-extensions
so I believe this is a built-in feature. - a option to configure a proxy-bypass-list in the user-settings is missing (this would be a great addition not only because the parameters are not working but in general)
VS Code Info
VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:34:36.336Z) OS version: Windows_NT x64 6.3.9600
System Info
Item | Value |
---|---|
CPUs | Intel® Xeon® CPU E5-2680 v3 @ 2.50GHz (2 x 2497) |
Memory (System) | 8.00GB (6.40GB free) |
Process Argv | C:\Program Files\Microsoft VS Code\Code.exe |
Screen Reader | no |
VM | 100% |
Extensions (18)
Extension | Author (truncated) | Version |
---|---|---|
rainbow-brackets | 2gu | 0.0.6 |
npm-intellisense | chr | 1.3.0 |
vscode-markdownlint | Dav | 0.13.0 |
vscode-eslint | dba | 1.4.7 |
githistory | don | 0.4.0 |
vscode-generate-getter-setter | DSK | 0.4.2 |
gitlens | eam | 8.0.2 |
EditorConfig | Edi | 0.12.1 |
tslint | eg2 | 1.0.28 |
LogFileHighlighter | emi | 2.1.1 |
json-tools | eri | 1.0.2 |
docthis | joe | 0.6.0 |
git-indicators | lam | 2.1.1 |
quicktype | qui | 8.5.86 |
linter-xo | sam | 2.1.3 |
json-schema-validator | tbe | 0.1.0 |
better-align | wwm | 1.1.6 |
markdown-all-in-one | yzh | 1.0.5 |
(2 theme extensions excluded)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
@joaomoreno looking through some old issues it seems #27838 should have fixed proxy settings being ignored but user posted this recently and it seems to be still related in current build:
https://gitlab.com/fatihacet/gitlab-vscode-extension/issues/10#note_61906562
They were able to circumvent this with changing in Windows 10 Control Panel but might be worth noting. /cc @code-adn
@joaomoreno , @cdenneen Same issue here. Although I set the proxy server via the command line using
--proxy-server=
and setting it in the personal settings via"http.proxy":
I get the following error message:Seems to me that VSCode is still using the systems settings and not the one used via the command line and personal profile.
To circumvent the NTLM Corporate Proxy I’m using CNTLM on my local machine and configured VSCode accordingly as stated above.