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 by adding any or all of the following optional lines:
http_proxy=host:port
https_proxy=host:port
no_proxy=host1, host2
to the cloud.properties file at one of the following locations:
- MacOS and Linux
If $XDG_CONFIG_HOME is set:
$XDG_CONFIG_HOME/testcontainers/cloud.properties
Otherwise:
$HOME/.config/testcontainers/cloud.properties
- Windows
If $XDG_CONFIG_HOME is set:
%xdg_config_home%\testcontainers\cloud.properties
Otherwise:
%userprofile%\.config\testcontainers\cloud.properties
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