Skip to content

How to Connect Via an HTTP(S) Proxy

Sometimes, connections to external systems (source code repositories, issue trackers, etc.) have to go through an HTTP(S) proxy and Teamscale needs to be configured appropriately.

Configuring the Proxy Host and Port

At a minimum, you will need to configure there proxy's host name or IP address and its port using Java's standard system properties. To do so, add the following to the JVM_EXTRA_ARGS entry in the file $TEAMSCALE_HOME/config/jvm.properties for HTTP and HTTPS connections, respectively:

properties
-Dhttp.proxyHost=<HTTP-Proxy-Host>
-Dhttp.proxyPort=<HTTP-Proxy-Port>
properties
-Dhttps.proxyHost=<HTTPS-Proxy-Host>
-Dhttps.proxyPort=<HTTPS-Proxy-Port>

Furthermore, for the HTTPS proxy, you will need to ensure that the proxy's SSL/TLS certificate can be validated using Teamscale's certificate store.

Providing Credentials to the Proxy

Sometimes, a proxy will itself require user name and password, distinct from any credentials required by the external systems accessed via the proxy. To configure user name and password, add the following to the JVM_EXTRA_ARGS entry in the file $TEAMSCALE_HOME/config/jvm.properties for HTTP and HTTPS, respectively:

properties
-Dhttp.proxyUser=<HTTP-Proxy-User-Name>
-Dhttp.proxyPassword=<HTTP-Proxy-User-Password>
properties
-Dhttps.proxyUser=<HTTPS-Proxy-User-Name>
-Dhttps.proxyPassword=<HTTPS-Proxy-User-Password>

Bypassing the Proxy

Sometimes, only some connections to external systems should go through the HTTP or HTTPS proxy; connections to other systems should or must be made directly. In this case, add the following to the JVM_EXTRA_ARGS entry in the file $TEAMSCALE_HOME/config/jvm.properties: (Please make sure to surround this parameter with double quotes when using the | character.)

properties
"-Dhttp.nonProxyHosts=localhost|127.0.0.1|*:8080|..."

HTTP and HTTPS

Unlike the other properties above, the http.nonProxyHosts property affects both HTTP and HTTPS. In particular, setting the non-existent https.nonProxyHosts has no effect.