How to use behind a network proxy

Note

Only HTTP and HTTPS proxies are supported. No socks. Automatic values definition from PAC file available.

Passing as CLI option

  • the proxy configuration is scoped to the QDT execution.

  • it supports only one URL for both HTTP and HTTPS

qdt --proxy-http "http://user:password@proxyserver.intra:8765"

Using environment variables

For proxy definition, QDT use this order of priority:

  • QDT_PROXY_HTTP

  • QDT_PAC_FILE

  • PAC file from system

  • Proxy configuration from system

  • Generic HTTP_PROXY and HTTPS_PROXY

Custom QDT_PROXY_HTTP

  • it avoids potential conflict with “classic” proxy settings

  • it allows to use a specific network proxy for QDT (can be useful for some well controlled systems)

Use PAC file

PAC file can be used by SysAdmin to define proxy with a set of rules depending on the url.

PyPac is used for PAC file management. By default we are using the PAC file defined by system but a custom PAC file can be defined with QDT_PAC_FILE environment variable (local file or url).

Note

When no QDT_PAC_FILE is set, QDT lets PyPAC auto-discover the PAC file: OS settings first (Windows registry, macOS preferences), then the WPAD protocol through DNS, using the workstation FQDN. On workstations without any PAC file, this discovery costs a few DNS lookups and HTTP requests: setting QDT_PROXY_HTTP (or HTTP_PROXY/HTTPS_PROXY) short-circuits it.

Note

PAC files are downloaded by PyPAC with trust_env=False: the PAC URL itself is always reached directly, never through a proxy. It must be reachable without proxy from the workstation.

Generic HTTP_PROXY and HTTPS_PROXY

  • it allows a specific URL by protocol (scheme)

Example on Windows PowerShell

Only for the QDT command scope:

$env:QDT_PROXY_HTTP='http://user:password@proxyserver.intra:8765'; qdt -vvv

At the shell session scope:

> $env:QDT_PROXY_HTTP='http://user:password@proxyserver.intra:8765'
> qdt -vvv