You can use environment variables or Testcontainers Settings to set up your Testcontainers Cloud client to point to your proxy.
If you are running Testcontainers Cloud client in a network which uses an HTTP Proxy, you have three ways of setting up the client to use it.
In order for changes to take effect, make sure to relaunch the agent CLI or select "Restart" in the tray menu for the desktop version.
1. Using environment variables
If you are launching the client from a shell which has any of the following environment
variables set up to point to your proxy, the client will automatically pick these up and
you're already good to go:
- `http_proxy` or `HTTP_PROXY`
- `https_proxy` or `HTTPS_PROXY`
- `no_proxy` or `NO_PROXY`
You could get more information about these environment variables for curl.
2. Using the Testcontainers Cloud properties file
If you do not have the option of setting shell environment variables, you can also provide
the proxy settings in one of the following locations, depending on the operating system you have:
- MacOS
${HOME}/Library/Application Support/testcontainers.cloud.desktop/v1/cloud.properties
- Windows
%AppData%\testcontainers.cloud.desktop\v1\cloud.properties
- Linux
${XDG_CONFIG_HOME:-$HOME}/.config/testcontainers.cloud.desktop/v1/cloud.properties
In case the $XDG_CONFIG_HOME env variable is undefined, $HOME will be used instead.
With the content, which is identical for all the platforms (each line is optional):
http_proxy=host:port
https_proxy=host:port
no_proxy=host1, host2
3. Using the Testcontainers Settings
Alternatively, you can also provide the proxy settings in the `$HOME/.testcontainers.properties` file. The keys are the same as for Testcontainers Cloud properties file above.
Please note that this file might be modified automatically by the client