question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proxy parameters are ignored and user-settings are missing a proxy-bypass option

See original GitHub issue

Issue Type

Bug

Description

@joaomoreno mentioning you here as discussed in https://github.com/Microsoft/vscode-docs/pull/1069

Steps to reproduce

  1. Start VSC using code --proxy-server="myproxy:8080" --proxy-bypass-list="*.someinternaldomain" --ignore-certificate-errors
  2. Make sure in the user settings the options http.proxy and http.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:

  1. 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.
  2. 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)

Reproduces without extensions

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cdenneencommented, Mar 6, 2018

@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

image

They were able to circumvent this with changing in Windows 10 Control Panel but might be worth noting. /cc @code-adn

1reaction
tmeckelcommented, Aug 23, 2018

@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:

Unable to load schema from 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json': <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta type="copyright" content="Copyright (C) 1996-2017 The Squid Software Foundation and contributors">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: Cache Access Denied</title>
...

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proxy parameters are ignored and user-settings are ... - GitHub
Make sure in the user settings the options http.proxy and http.proxyStrictSSL are not set. Expected outcome: VSC should use the proxy myproxy: ...
Read more >
Run the agent behind a web proxy - Azure Pipelines
In this article. Azure Pipelines, TFS 2018 RTM and newer; Specify proxy bypass URLs. Azure DevOps Services | Azure DevOps Server 2022 -...
Read more >
Chrome GPO - Proxy Setting Windows - How to set
Hello, unfortunately I have problems setting "Proxy Settings" via GPO on Windows. GPO Shows me. UserSetting\AdministrativeSettings\Google\Google ...
Read more >
Git proxy bypass - Stack Overflow
proxy configuration parameter. For certain addresses I need to bypass the proxy. Is there a no-proxy/bypass-proxy configuration parameter?
Read more >
Using Group Policy Settings to Configure Horizon Client
If Unauthenticated Access is not used for a specific connection to a server, this setting is ignored. Users can select an account by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found