{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Treasure Code","product_name":"Treasure Code","type":"markdown"},"seo":{"title":"HTTP Proxy Configuration - tdx | Treasure Data","description":"Configure tdx to work with corporate HTTP proxies and SSL inspection. Set up proxy via config file or environment variables.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]},"image":"/assets/og-image.ba836864a30434f560a4f7720f8a09019ad30ff828b20c5052ae933ba7121524.d7ef4821.png"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"proxy-configuration","__idx":0},"children":["Proxy Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your network requires an HTTP proxy (common in corporate environments with SSL inspection), you can configure ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx"]}," to route all API requests through a proxy."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setting-a-proxy","__idx":1},"children":["Setting a Proxy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are three ways to configure a proxy, listed in priority order:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1. Global config"]}," — Add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proxy"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.config/tdx/tdx.json"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"proxy\": \"http://proxy.corp.com:8080\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2. Environment variable"]}," — Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTPS_PROXY"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP_PROXY"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export HTTPS_PROXY=http://proxy.corp.com:8080\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["3. SDK"]}," — Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proxy"]}," option when creating a TDX instance programmatically:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const tdx = TDX.create({\n  site: 'us01',\n  proxy: 'http://proxy.corp.com:8080'\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"proxy-with-authentication","__idx":2},"children":["Proxy with Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your proxy requires authentication, include credentials in the URL:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"proxy\": \"http://username:password@proxy.corp.com:8080\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Credentials are automatically masked in logs and error messages."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resolution-order","__idx":3},"children":["Resolution Order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When tdx needs a proxy, it checks these sources in order:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SDK ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proxy"]}," option"]}," (programmatic use only)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Global config"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proxy"]}," field in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.config/tdx/tdx.json"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTPS_PROXY"]}]}," environment variable"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP_PROXY"]}]}," environment variable"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verifying-proxy-configuration","__idx":4},"children":["Verifying Proxy Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}," to confirm proxy is being used:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx --debug databases\n# Look for \"Using HTTP proxy: http://proxy.corp.com:8080\" in output\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":5},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error"},"children":["Error"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Cause"},"children":["Cause"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fix"},"children":["Fix"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROXY_CONNECTION_FAILURE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cannot reach the proxy server"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify proxy URL and that the proxy is running"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["407 Proxy Authentication Required"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Proxy credentials are wrong or missing"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add or fix ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["username:password@"]}," in the proxy URL"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ECONNREFUSED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Target server unreachable (not a proxy issue)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check your network or TD API endpoint"]}]}]}]}]}]},"headings":[{"value":"Proxy Configuration","id":"proxy-configuration","depth":1},{"value":"Setting a Proxy","id":"setting-a-proxy","depth":2},{"value":"Proxy with Authentication","id":"proxy-with-authentication","depth":2},{"value":"Resolution Order","id":"resolution-order","depth":2},{"value":"Verifying Proxy Configuration","id":"verifying-proxy-configuration","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2}],"frontmatter":{"seo":{"title":"HTTP Proxy Configuration - tdx | Treasure Data","description":"Configure tdx to work with corporate HTTP proxies and SSL inspection. Set up proxy via config file or environment variables.","image":"/assets/og-image.ba836864a30434f560a4f7720f8a09019ad30ff828b20c5052ae933ba7121524.d7ef4821.png"}},"lastModified":"2026-02-14T00:54:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/treasure-code/guide/proxy","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}