If your network requires an HTTP proxy (common in corporate environments with SSL inspection), you can configure tdx to route all API requests through a proxy.
There are three ways to configure a proxy, listed in priority order:
1. Global config — Add proxy to ~/.config/tdx/tdx.json:
{
"proxy": "http://proxy.corp.com:8080"
}2. Environment variable — Set HTTPS_PROXY or HTTP_PROXY:
export HTTPS_PROXY=http://proxy.corp.com:80803. SDK — Pass proxy option when creating a TDX instance programmatically:
const tdx = TDX.create({
site: 'us01',
proxy: 'http://proxy.corp.com:8080'
});If your proxy requires authentication, include credentials in the URL:
{
"proxy": "http://username:password@proxy.corp.com:8080"
}Credentials are automatically masked in logs and error messages.
When tdx needs a proxy, it checks these sources in order:
- SDK
proxyoption (programmatic use only) - Global config —
proxyfield in~/.config/tdx/tdx.json HTTPS_PROXYenvironment variableHTTP_PROXYenvironment variable
Use --debug to confirm proxy is being used:
tdx --debug databases
# Look for "Using HTTP proxy: http://proxy.corp.com:8080" in output| Error | Cause | Fix |
|---|---|---|
PROXY_CONNECTION_FAILURE | Cannot reach the proxy server | Verify proxy URL and that the proxy is running |
407 Proxy Authentication Required | Proxy credentials are wrong or missing | Add or fix username:password@ in the proxy URL |
ECONNREFUSED | Target server unreachable (not a proxy issue) | Check your network or TD API endpoint |