Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11251

Add ability to not use configured proxy for some hosts

    XMLWordPrintable

    Details

    • Edition:
      Community
    • Production Notes:
      None

      Description

      What

      Initial thread: https://community.sonarsource.com/t/webhookcallerimpl-okhttp3-doesnt-honour-http-nonproxyhosts/1912

      HTTP requests initiated from server (web server and compute engine) should take into account the proxy settings (properties http.proxyPort, http.nonProxyHosts, ...):

      • webhook calls
      • download of update center properties files
      • download of plugins when installing from the Update Center
      • upload of telemetry data
      • class HttpDownloader provided by the Plugin API
      • PR decoration (Github, Bitbucket Cloud, ...)
      • authentication (eg. Github, OAuth, ...)

      How

      Proxy to be used by SonarQube can be configured in sonar.properties with properties such as http.proxyHost, http.proxyPort, ...

      A new property http.nonProxyHosts will be added. It accepts a list of pipe separated hosts.

      SonarQube will set JVM system properties http.nonProxyHosts and ftp.nonProxyHosts in Web Server and Compute Engine processes with the value of this property (see https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/doc-files/net-properties.html).

      Implementation note: OkHttp does not honour http.nonProxyHosts by default (https://github.com/square/okhttp/issues/2693).

        Attachments

          Activity

            People

            Assignee:
            sebastien.lesaint Sebastien Lesaint
            Reporter:
            simon.brandhof Simon Brandhof (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: