New NodeJS based sonarqube vsts task does not support proxy?

We are currently using Sonarqube 7.2.1 and VSTS task 3.x which is based on PowerShell this works fine with our proxy settings. We want to upgrade to the VSTS task 4.x which is NodeJS based but we are seeing the following error:

[SQ] API GET ‘/api/server/version’ failed, status code was: 502 (Bad Gateway)

This occurs when the task attempts to connect to sonarqube server during build.

To reproduce you would need to setup an HTTP Proxy and a Private VSTS/TFS agent and follow the following steps to configure the agent to use your proxy

Currently the only workaround we know of is rolling back to the PowerShell based task which works fine with the proxy.

I had a quick look at the NodeJS implementation and I think we are missing one crucial part which is to query the proxy details before making any http calls as documented here:


Hi, has this been solved in the mean while? We are experiencing same sort of issues with our private Azure DevOps agents and using the SonarCloud tasks. The SonarCloud task cannot reach Our agents have proxy settings, and we even tried https.proxy / http.proxy settings as additional parameters. Nothing worked, as our network people told me that the SonarCloud task still wants to go out directly to instead of via the proxy. Our firewall does not allow direct traffic.
Please fix this, e.g. by using the proxy as defined on the agent itself, as security is important.

PS: Using SonarCloud task v1.70