Proxies

It is possible to configure upstream proxies using the system properties:

  • externalProxyHost
  • externalProxyPort
  • externalProxyUsername
  • externalProxyPassword
  • externalProxyRealm

Iridium creates an instance of the BrowserMob proxy by default, and can optionally create other proxies like ZAP. Iridium will chain up the proxies it creates, and then point the final proxy in the chain to a proxy defined by these system properties if they have been set.

Important
Not all browsers support proxy settings. The Marionette driver (used by the latest versions of Firefox) is one example of a WebDriver that currently ignores the proxy settings. This limitation comes from the WebDriver itself, and may be resoloved in future updates.

When ZAP is enabled, it is the last proxy in the chain before the external proxy.

When ZAP is not enabled, BrowserMob is the last proxy in the chain before the external proxy (unless you specifically disable BrowserMob - see System Property Reference for more details on the startInternalProxy system property).

ZAP has support for an upstream NTLM proxy.

BrowserMob has some limitations in the kind of upstream proxies it can connect to, specifically that it can not use proxies that require NTLM authentication (see the AuthType class). You can work around this by using the cntlm proxy as the upstream proxy.

To use cntlm to proxy requests to an upstream NTLM proxy, you'll need a file called cntlm.ini like this:

Username        mcasperson
Domain          DOMAIN
Listen            3128
Proxy              192.168.1.1:8080
Auth            NTLM
PassLM          ABCDEF1234567890ABCDEF1234567890
PassNT          ABCDEF1234567890ABCDEF1234567890
PassNTLMv2      ABCDEF1234567890ABCDEF1234567890

The password hashes are generated using the command:

./cntlm -H

Start cntlm with the command:

/cntlm -f -v -ccntlm.ini

The start Iridium like this:

./gradlew run
-DtestDestination=FIREFOX
-DtestSource=/Users/mcasperson/test.feature
-Dconfiguration=/Users/mcasperson/configuration.xml
-Ddataset=/Users/mcasperson/dataset.xml
-DappURLOverride=https://localhost/index.html
-DleaveWindowsOpen=false
-DopenReportFile=false
-DsaveReportsInHomeDir=false
-DenableScenarioScreenshots=true
-DexternalProxyHost=127.0.0.1
-DexternalProxyPort=3128

results matching ""

    No results matching ""