Skip to content

Using LibMan with a proxy server

Jimmy Lewis edited this page Apr 19, 2021 · 1 revision

LibMan supports proxy settings through saved config settings or via environment variables. There are 4 proxy settings available:

  • http_proxy, which specifies the proxy server address.
  • http_proxy.user, which specifies the username to use when authenticating with the proxy server (if needed).
  • http_proxy.password, which specifies the password to use when authenticating with the proxy server (if needed).
  • http_proxy.bypass, which specifies a semi-colon (;) delimited list of address prefixes that should not be routed through the proxy server (if needed).

There is an identical set of properties with https instead of http (e.g. https_proxy). If both https_proxy and http_proxy are specified, the https_proxy values will be used.

Setting proxy settings via config file

Proxy settings can be set via the libman config command (use libman config --help for details on how to use the command). These settings are stored in the %USERPROFILE%\.librarymanager directory on Windows or %HOME%/.librarymanager on other platforms.

The following properties should be set with libman config --set:

  • https_proxy/http_proxy
  • https_proxy.user/http_proxy.user
  • https_proxy.bypass/http.proxy.bypass

The following property should be set with libman config --setEncrypted:

  • https_proxy.password/http_proxy.password

Note: The --setEncrypted feature is only supported on the Windows operating system.

Setting proxy settings via environment variables

LibMan will respect any of the above values if set via environment variables. Environment variables are prioritized over values stored in the configuration file. Setting environment variables depends on the platform you are running, please consult your platform documentation.

Note: the https_proxy.password values cannot be stored as environment variables, as they cannot use the same encrypt/decrypt algorithm.