Proxy Support¶
RAPS CLI supports HTTP/HTTPS proxy configuration through standard environment variables. This is essential for corporate networks and environments behind firewalls.
Quick Start¶
Set the proxy environment variables before running RAPS CLI:
Windows PowerShell:
$env:HTTP_PROXY = "http://proxy.company.com:8080"
$env:HTTPS_PROXY = "http://proxy.company.com:8080"
$env:NO_PROXY = "localhost,127.0.0.1,.local"
macOS/Linux:
export HTTP_PROXY="http://proxy.company.com:8080"
export HTTPS_PROXY="http://proxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1,.local"
Environment Variables¶
RAPS CLI uses the standard proxy environment variables that are automatically detected by the underlying HTTP client (reqwest):
HTTP_PROXY¶
HTTP proxy server URL for non-secure connections.
Format: http://[username:password@]host[:port]
Examples:
# Basic proxy
export HTTP_PROXY="http://proxy.company.com:8080"
# Proxy with authentication
export HTTP_PROXY="http://user:pass@proxy.company.com:8080"
# SOCKS5 proxy (if supported)
export HTTP_PROXY="socks5://proxy.company.com:1080"
HTTPS_PROXY¶
HTTPS proxy server URL for secure connections. If not set, HTTP_PROXY will be used for HTTPS connections as well.
Format: http://[username:password@]host[:port]
Examples:
# HTTPS proxy
export HTTPS_PROXY="http://proxy.company.com:8080"
# Different proxy for HTTPS
export HTTPS_PROXY="http://secure-proxy.company.com:8443"
NO_PROXY¶
Comma-separated list of hostnames or IP addresses that should bypass the proxy.
Format: host1,host2,host3 or *.domain.com
Examples:
# Bypass localhost and internal domains
export NO_PROXY="localhost,127.0.0.1,.local,.company.internal"
# Bypass specific hosts
export NO_PROXY="api.internal.com,192.168.1.0/24"
Common patterns:
- localhost - Local machine
- 127.0.0.1 - Loopback address
- .local - All .local domains
- .company.internal - All internal company domains
- 192.168.0.0/16 - Private network ranges
Configuration Methods¶
Method 1: Environment Variables (Recommended)¶
Set variables in your shell session:
PowerShell:
$env:HTTP_PROXY = "http://proxy.company.com:8080"
$env:HTTPS_PROXY = "http://proxy.company.com:8080"
$env:NO_PROXY = "localhost,127.0.0.1"
Bash/Zsh:
export HTTP_PROXY="http://proxy.company.com:8080"
export HTTPS_PROXY="http://proxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1"
Method 2: .env File¶
Add to your .env file:
HTTP_PROXY=http://proxy.company.com:8080
HTTPS_PROXY=http://proxy.company.com:8080
NO_PROXY=localhost,127.0.0.1,.local
Method 3: System-Wide Configuration¶
Windows:
setx HTTP_PROXY "http://proxy.company.com:8080"
setx HTTPS_PROXY "http://proxy.company.com:8080"
setx NO_PROXY "localhost,127.0.0.1"
macOS/Linux:
Add to ~/.bashrc or ~/.zshrc:
export HTTP_PROXY="http://proxy.company.com:8080"
export HTTPS_PROXY="http://proxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1,.local"
Testing Proxy Configuration¶
Test if proxy is working:
# Test authentication (will use proxy if configured)
raps auth test
# List buckets (will use proxy for API calls)
raps bucket list
If proxy is configured correctly, requests will go through the proxy. If not, you'll see connection errors.
Troubleshooting¶
"Connection refused" or "Network error"¶
-
Verify proxy URL is correct:
-
Check proxy requires authentication:
-
Verify NO_PROXY settings:
TLS/SSL Certificate Errors¶
Corporate proxies often intercept HTTPS traffic, which can cause certificate validation errors.
Option 1: Add proxy CA certificate to system trust store
Windows:
# Import certificate
Import-Certificate -FilePath proxy-ca.crt -CertStoreLocation Cert:\LocalMachine\Root
macOS:
# Import certificate
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain proxy-ca.crt
Linux:
# Copy certificate to system trust store
sudo cp proxy-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
Option 2: Disable certificate verification (NOT RECOMMENDED for production)
⚠️ Security Warning: Only use this for testing in controlled environments.
Set environment variable (reqwest respects this):
Proxy Authentication Issues¶
If your proxy requires authentication:
-
Include credentials in proxy URL:
-
Use URL encoding for special characters:
-
Check if proxy supports NTLM/Kerberos: Some proxies require NTLM or Kerberos authentication, which may need additional configuration.
Proxy Not Being Used¶
If requests aren't going through the proxy:
-
Verify environment variables are set:
-
Check NO_PROXY doesn't exclude target:
-
Restart terminal/shell: Environment variables are only available in the current shell session.
Corporate Network Considerations¶
Firewall Rules¶
Ensure these domains are allowed through your corporate firewall:
- developer.api.autodesk.com - APS API endpoints
- api.userprofile.autodesk.com - User profile API
- oss.autodesk.com - Object Storage Service
- modelderivative.autodesk.com - Model Derivative API
- webhooks.autodesk.com - Webhooks API
- developer.api.autodesk.com/da/us-east/v3 - Design Automation API
Proxy Authentication¶
Many corporate proxies require authentication. Use one of these methods:
-
Username/Password in URL:
-
NTLM Authentication: May require additional configuration depending on your proxy setup.
Certificate Pinning¶
Some corporate proxies use certificate pinning. You may need to: 1. Export the proxy's CA certificate 2. Add it to your system's trust store 3. Ensure RAPS CLI uses the system trust store (default behavior)
Examples¶
Basic Corporate Proxy¶
export HTTP_PROXY="http://proxy.company.com:8080"
export HTTPS_PROXY="http://proxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1,.local,.company.internal"
raps auth test
Proxy with Authentication¶
export HTTP_PROXY="http://user:pass@proxy.company.com:8080"
export HTTPS_PROXY="http://user:pass@proxy.company.com:8080"
raps bucket list
Bypass Proxy for Internal APIs¶
export HTTP_PROXY="http://proxy.company.com:8080"
export NO_PROXY="localhost,127.0.0.1,*.internal.company.com,192.168.0.0/16"
raps hub list
CI/CD Integration¶
GitHub Actions¶
env:
HTTP_PROXY: http://proxy.company.com:8080
HTTPS_PROXY: http://proxy.company.com:8080
NO_PROXY: localhost,127.0.0.1
steps:
- name: List buckets
run: raps bucket list
Azure DevOps¶
variables:
HTTP_PROXY: 'http://proxy.company.com:8080'
HTTPS_PROXY: 'http://proxy.company.com:8080'
NO_PROXY: 'localhost,127.0.0.1'
steps:
- script: raps bucket list
GitLab CI¶
variables:
HTTP_PROXY: "http://proxy.company.com:8080"
HTTPS_PROXY: "http://proxy.company.com:8080"
NO_PROXY: "localhost,127.0.0.1"
test:
script:
- raps bucket list
Notes¶
- RAPS CLI uses the
reqwestHTTP client, which automatically detects and uses standard proxy environment variables - Proxy settings apply to all HTTP/HTTPS requests made by RAPS CLI
- Authentication tokens and credentials are never sent to the proxy (only HTTP headers)
- Proxy configuration does not affect local file operations or token storage