Configure Cline to work behind firewalls and proxies
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.
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):
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.
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 encounter problems with Cline networking, first verify your proxy
configuration works using curl:
# Linux/macOSexport https_proxy=http://proxy.company.com:8080curl -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 the logs for messages confirming your proxy configuration and any
network-related errors:
CLI: ~/.cline/data/logs/cline.log, or the file CLINE_LOG_PATH names.
cline doctor log opens it. If the hub is involved, also check
~/.cline/data/logs/hub-daemon.log.
JetBrains IDEs: ~/.cline/cline-core-service.log. Cline’s process for
every open project writes to this one file.