# New NodeJS based sonarqube vsts task does not support proxy?

**URL:** <https://community.sonarsource.com/t/new-nodejs-based-sonarqube-vsts-task-does-not-support-proxy/1287>\
**Category:** SonarQube Cloud\
**Tags:** azuredevops-services\
**Created:** [July 25, 2018, 8:21am UTC](https://community.sonarsource.com/t/new-nodejs-based-sonarqube-vsts-task-does-not-support-proxy/1287 "2018-07-25T08:21:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keyoke\_za](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/keyoke_za/32/502_2.png) [@keyoke\_za](https://community.sonarsource.com/u/keyoke_za)\
**Post date:** [July 25, 2018, 8:21am UTC](https://community.sonarsource.com/t/new-nodejs-based-sonarqube-vsts-task-does-not-support-proxy/1287/1 "2018-07-25T08:21:24Z")

</div>

Hi  
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

> **[Run the agent behind a web proxy - Azure Pipelines](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/proxy?view=vsts&tabs=windows)**
>
> Learn how you can run a v2 private build and release agent behind a web proxy for Azure Pipelines and Team Foundation Server (TFS)

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:

> <https://github.com/Microsoft/azure-pipelines-task-lib/blob/master/node/docs/proxy.md>

Regards  
Gareth

---

<div class="post-metadata">

**Author:** ![zaat](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/zaat/32/242_2.png) [@zaat](https://community.sonarsource.com/u/zaat)\
**Post date:** [July 16, 2019, 7:55am UTC](https://community.sonarsource.com/t/new-nodejs-based-sonarqube-vsts-task-does-not-support-proxy/1287/2 "2019-07-16T07:55:34Z")

</div>

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 [sonarcloud.io](http://sonarcloud.io). 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 [sonarcloud.io](http://sonarcloud.io) 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
