Failed Sonarqube Scan with proxy

I have a sonarqube Scanner running on internal Jenkin server, so I need to enable proxy to make my job talk to SonarCloud. What is the right way to do it? I tried to add proxy in Jenkin setting, however, it is working for other jobs except sonarqube scan.

My script:
withSonarQubeEnv(‘SonarCloudEnv’) {
bat "dotnet SonarScanner.MSBuild.dll begin /k:“key” "

    }

Error Message:
Preparing working directories…
13:11:44.502 Updating build integration targets…
13:11:44.533 Fetching analysis configuration settings…
13:11:47.606 Failed to request and parse ‘https://sonarcloud.io/api/server/version’: An error occurred while sending the request. A connection with the server could not be established

Hi,

I’m afraid but for now the Scanner for MSBuild contains a part that is not proxy-friendly. We are working on it, there’s an opened issue on our side here

Thanks.