docs/troubleshooting/networking-and-proxies.mdx
If you're working behind a corporate proxy or firewall, you'll need to configure proxy settings for Cline to connect to AI providers. The configuration varies depending on which version of Cline you're using.
The VSCode extension automatically uses VSCode's built-in proxy settings. See Network Connections in Visual Studio Code, Proxy server support for instructions on how to set up proxies in VSCode. No additional configuration is needed for Cline itself.
The Cline CLI uses standard HTTP proxy environment variables. Configure these before running cline commands.
Windows (Command Prompt)
set https_proxy=http://proxy.company.com:8080
set http_proxy=http://proxy.company.com:8080
cline start
Windows (PowerShell)
$env:https_proxy="http://proxy.company.com:8080"
$env:http_proxy="http://proxy.company.com:8080"
cline start
macOS/Linux
export https_proxy=http://proxy.company.com:8080
export http_proxy=http://proxy.company.com:8080
cline start
If your proxy requires authentication, include credentials in the URL:
export https_proxy=http://username:[email protected]:8080
export http_proxy=http://username:[email protected]:8080
To prevent localhost traffic from going through the proxy, set the no_proxy environment variable:
Windows
set no_proxy=localhost,127.0.0.1,.local
macOS/Linux
export no_proxy=localhost,127.0.0.1,.local
If your proxy uses a custom CA certificate:
Windows
set NODE_EXTRA_CA_CERTS=C:\path\to\ca-certificate.crt
cline start
macOS/Linux
export NODE_EXTRA_CA_CERTS=/path/to/ca-certificate.pem
cline start
To avoid setting these variables every time, add them to your shell profile or system environment variables.
macOS/Linux (add to ~/.bashrc, ~/.zshrc, or ~/.profile):
# Proxy configuration
export https_proxy=http://proxy.company.com:8080
export http_proxy=http://proxy.company.com:8080
export no_proxy=localhost,127.0.0.1,.local
export NODE_EXTRA_CA_CERTS=/path/to/ca-certificate.pem
Windows (System Environment Variables):
Cline CLI only supports HTTP proxies. It does not support SOCKS proxies, proxy autoconfiguration (PAC) scripts, or HTTP proxies which require authentication beyond a basic username and password.
The JetBrains plugin uses the IDE's HTTP proxy settings.
Open Settings/Preferences:
Ctrl+Alt+S (Windows/Linux) or Cmd+, (macOS)Navigate to:
Appearance & Behavior > System Settings > HTTP Proxy
Select "Manual proxy configuration"
Configure your proxy:
proxy.company.com8080localhost,127.0.0.1Click "Check connection" to verify the settings
Click "OK" to apply
Restart the IDE
After configuring the proxy, test that Cline can connect to your AI provider:
If your proxy uses a custom CA:
Cline in JetBrains only supports HTTP proxies. It does not support SOCKS proxies, proxy autoconfiguration (PAC) scripts, or HTTP proxies which require authentication beyond a basic username and password.
Cline does not pick up changed proxy settings dynamically. After changing proxy settings, restart the IDE for Cline to use the new settings.
If you're experiencing connection timeouts:
If you see certificate-related errors:
NODE_EXTRA_CA_CERTS points to the correct certificate filecurl -x proxy.corp.example:8080 --cacert /path/to/ca-cert.pem -o - -vv https://api.cline.bot/http.proxyStrictSSL in VSCode (not recommended for production)If you encounter problems with Cline networking, first verify your proxy configuration works using curl:
# Linux/macOS
export https_proxy=http://proxy.company.com:8080
curl -vv https://api.anthropic.com
# Windows PowerShell
$env:https_proxy="http://proxy.company.com:8080"
curl.exe -vv https://api.anthropic.com
Use --cacert $NODE_EXTRA_CA_CERTS to specify a certificate if necessary.
Next, check ~/.cline/cline-core-service.log (CLI, JetBrains) for log messages confirming your proxy configuration and any network-related errors.
export https_proxy=http://username:[email protected]:8080
export NODE_EXTRA_CA_CERTS=/path/to/ca-cert.pem
export https_proxy=http://proxy.company.com:8080
export http_proxy=http://proxy.company.com:8080
export https_proxy=http://proxy.company.com:8080
export no_proxy=localhost,127.0.0.1,.company.local,192.168.0.0/16