Cursor Enterprise Network Proxy Configuration: Complete Guide from HTTP_PROXY to Certificate Import
"Cursor official enterprise network configuration documentation, detailing three proxy configuration paths: environment variables, settings.json, and startup parameters"
"Cursor forum user feedback on HTTP/2 requests not going through proxy settings and the solution"
You click Send, and Cursor’s Agent panel pops up a Network error. Your global proxy is clearly enabled, so why can’t it connect?
The answer lies in Electron v25+‘s network stack—Cursor, VS Code, and the operating system each use their own proxy configurations, completely separate from one another. This article walks through enterprise network proxy configuration from start to finish: HTTP_PROXY environment variables, settings.json proxy configuration, HTTP/2 protocol compatibility issues, SSL certificate import, and Anygress transparent proxy. We cover Windows, Mac, and WSL2 environments.
Why Doesn’t Cursor Inherit System Proxy Settings?
Cursor is built on Electron v25+. Electron’s network stack is the same as Chrome’s, which doesn’t automatically inherit proxy settings from the operating system or parent process. This differs from VS Code—VS Code can read system proxy settings, but Cursor needs its own configuration.
Environment variables add another layer of complexity. When you run export HTTP_PROXY=... in a terminal and then launch Cursor from the Dock or desktop icon, that variable never gets passed through. The variable only takes effect if you launch the cursor command from that same terminal window.
So the most reliable approach for enterprise networks is to directly modify Cursor’s settings.json.
What Does the Official Documentation Say?
According to Cursor’s Network Configuration documentation, there are three proxy configuration paths for enterprise deployment:
- Environment variables:
HTTP_PROXY,HTTPS_PROXY,NO_PROXY(only effective when launched from terminal) - settings.json:
http.proxy,http.proxySupport,http.proxyStrictSSL - Startup parameters:
--proxy-server,--proxy-auto-detect,--disable-http2
Each method has its use cases, which we’ll explore in detail.
HTTP_PROXY Environment Variable Configuration
Environment variables are the most lightweight method, but there’s a prerequisite: Cursor must be launched from a configured terminal.
Windows PowerShell
# Set proxy (with authentication)
$env:HTTP_PROXY = "http://username:[email protected]:8080"
$env:HTTPS_PROXY = "http://username:[email protected]:8080"
# Bypass proxy for local addresses
$env:NO_PROXY = "localhost,127.0.0.1,.internal.corp"
# Launch Cursor from the same terminal
cursor
macOS / Linux
# Bash/Zsh
export HTTP_PROXY="http://username:[email protected]:8080"
export HTTPS_PROXY="http://username:[email protected]:8080"
export NO_PROXY="localhost,127.0.0.1,.internal.corp"
# Launch Cursor
cursor
WSL2 Special Handling
WSL2 has its own virtual network card and isn’t on the same subnet as the Windows host. Windows proxy settings don’t automatically sync into WSL2.
One approach is to use the graftcp tool for transparent TCP proxying:
# Install graftcp
sudo apt install graftcp
# Configure proxy address (graftcp.conf)
proxy_addr = "192.168.1.100:7890" # Windows host's proxy address
# Launch Cursor with graftcp
graftcp cursor
Common Pitfalls:
- Launching from Dock/desktop icon → environment variables don’t take effect
- Setting only
HTTP_PROXYwithoutHTTPS_PROXY→ Cursor API requests (all HTTPS) won’t go through proxy - Leaving
.internal.corpout ofNO_PROXY→ internal network services also get proxied, slowing them down
If you don’t want to launch from a terminal every time, settings.json configuration is more convenient.
settings.json Proxy Configuration (Recommended Method)
Open Cursor, press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows), and type Preferences: Open User Settings (JSON).
Add these items to settings.json:
{
"http.proxy": "http://username:[email protected]:8080",
"http.proxySupport": "override",
"http.proxyStrictSSL": false,
"http.noProxy": ["localhost", "127.0.0.1", "*.internal.corp"],
"cursor.general.disableHttp2": true,
"cursor.general.disableHttp1SSE": true
}
Field-by-field explanation:
| Field | Purpose |
|---|---|
http.proxy | Proxy server address, supports http:// and socks5:// |
http.proxySupport | "override" forces proxy usage; "on" only uses proxy when direct connection fails |
http.proxyStrictSSL | Enterprise proxies often have self-signed certificates; set to false to avoid validation failures |
http.noProxy | Local addresses to bypass proxy, preventing slowdown of internal services |
cursor.general.disableHttp2 | Must be set when enterprise proxy doesn’t support HTTP/2 |
cursor.general.disableHttp1SSE | Some proxies don’t support SSE long connections; disable to use short polling |
Restart to Apply.
After modifying settings.json, you must completely close and reopen Cursor. Just refreshing the window (Cmd+R) won’t reload the network configuration.
Windows Shortcut Startup Parameters:
If you prefer not to modify settings.json, you can add parameters to the shortcut:
cursor.exe --proxy-server="http://proxy.company.com:8080" --proxy-auto-detect --disable-http2
This method is equivalent to settings.json but takes effect on every launch without requiring a restart.
HTTP/2 Protocol Incompatibility and Solutions
Cursor’s Agent functionality relies on HTTP/2 bidirectional streaming. Real-time chat, code completion, and multi-turn conversations all depend on HTTP/2’s persistent connections and streaming.
Here’s the problem: many enterprise proxies don’t support HTTP/2.
SSL inspection proxies like Zscaler and Netskope only handle HTTP/1.1. When Cursor sends HTTP/2 requests to these proxies, they either get truncated, return garbled data, or simply timeout.
Symptoms:
- Agent panel stuck on “Thinking…”
- Code completion works sometimes, errors other times
- Chat mode works fine, but Agent mode shows all red errors
Solution: Disable HTTP/2 and let Cursor fall back to HTTP/1.1 SSE.
{
"cursor.general.disableHttp2": true
}
Or via startup parameter:
cursor --disable-http2
After disabling, Cursor uses HTTP/1.1 Server-Sent Events (SSE) for streaming. SSE is unidirectional and less efficient than HTTP/2 bidirectional streams, but offers better compatibility.
One detail: When both --disable-http2 and settings.json’s disableHttp2 are present, the startup parameter takes precedence. If you want to ensure HTTP/2 is disabled, set both.
Based on Cursor Forum feedback, this method resolves Agent issues for most enterprise users. One user reported in Cursor http/2 requests don’t go through proxy setting that Agent functionality was restored after disabling HTTP/2.
SSL Certificate Import (Enterprise Man-in-the-Middle Inspection)
When enterprise proxies perform SSL decryption, they replace the original certificate with their own. Netskope and Zscaler both have this capability.
Cursor tries to connect to cursor.com or api2.cursor.sh, but receives a certificate signed by the enterprise proxy instead of Let’s Encrypt or DigiCert. Validation fails, and the connection drops.
Symptoms:
TLS handshake timeoutcertificate signature failure- Agent panel shows
CERT_AUTHORITY_INVALID
Method 1: Import Enterprise Root Certificate to System Certificate Store (Windows)
- Press
Win+Rand typecertmgr.msc - Expand Trusted Root Certification Authorities → Certificates
- Right-click → All Tasks → Import
- Select your enterprise root certificate file (
.ceror.pem) - Restart Cursor after completion
This method makes the system trust the enterprise certificate, and Cursor will trust it too.
Method 2: Specify Certificate via Environment Variable (Recommended)
Cursor supports SSL_CERT_FILE and SSL_CERT_DIR environment variables:
# Single certificate
export SSL_CERT_FILE=/path/to/company-root-ca.pem
cursor
# Certificate directory
export SSL_CERT_DIR=/etc/ssl/certs
cursor
This method is more flexible—it doesn’t modify the system certificate store and only affects Cursor.
Method 3: Disable SSL Strict Validation (Not Recommended)
{
"http.proxyStrictSSL": false
}
This bypasses certificate validation but reduces security. Only use this in test environments, not production.
Mac / Linux Certificate Import:
# Debian/Ubuntu
sudo cp company-root-ca.pem /usr/local/share/ca-certificates/
sudo update-ca-certificates
# macOS
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain company-root-ca.pem
Restart Cursor after importing.
Anygress and cursor-api-proxy (Advanced Configuration)
For enterprise networks, remote servers, and private network scenarios, standard proxy configuration isn’t enough. There’s an open-source project cursor-api-proxy (GitHub: anyrobert/cursor-api-proxy) specifically designed for these situations.
Core Principle:
cursor-api-proxy starts a local proxy service that forwards Cursor’s API requests to the real server. In between, it can perform TLS certificate replacement, Tailscale network tunneling, API key injection, and other operations.
Configuration Example:
# Clone the project
git clone https://github.com/anyrobert/cursor-api-proxy
cd cursor-api-proxy
# Configure environment variables
export CURSOR_BRIDGE_TLS_CERT=./macbook.tail4048eb.ts.net.crt
export CURSOR_BRIDGE_TLS_KEY=./macbook.tail4048eb.ts.net.key
export CURSOR_BRIDGE_API_KEY=your-secret-key
export CURSOR_PROXY_URL=http://127.0.0.1:8765
# Start (with Tailscale TLS)
npm start -- --tailscale
Then point Cursor’s proxy to this service:
{
"http.proxy": "http://127.0.0.1:8765"
}
Use Cases:
- Corporate network blocks direct connections to
cursor.com - Remote servers without public internet access need Tailscale relay
- Need to inject unified API Key into requests (multi-user sharing)
- Private deployment requiring API requests to go through internal gateway
This method is more complex than standard proxy configuration but offers greater flexibility. It’s suitable for teams with DevOps capabilities.
Conclusion
When configuring Cursor proxy in enterprise networks, troubleshoot in this order:
- First, set settings.json —
http.proxy+http.proxySupport: "override" - Disable HTTP/2 — If enterprise proxy doesn’t support it, add
disableHttp2: true - Check certificates — For
TLS handshake timeoutorCERT_AUTHORITY_INVALID, import enterprise root certificate - Use cursor-api-proxy for complex scenarios — Remote servers, private networks, Tailscale tunneling
Common error reference:
| Error Message | Cause | Solution |
|---|---|---|
Network error | Proxy not configured or not taking effect | Check settings.json + restart Cursor |
Connection refused | Incorrect proxy address or proxy service not running | Verify http.proxy address |
TLS handshake timeout | SSL certificate mismatch | Import enterprise root certificate or set proxyStrictSSL: false |
Agent stuck | HTTP/2 incompatibility | Set disableHttp2: true |
After configuration, remember to completely restart Cursor—not just refresh the window.
Cursor Enterprise Network Proxy Configuration Workflow
Complete configuration steps from environment variables to certificate import
⏱️ Estimated time: 15 min
- 1
Step1: Configure settings.json proxy
Open Cursor, press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows), type Preferences: Open User Settings (JSON), and add http.proxy, http.proxySupport: "override", http.proxyStrictSSL: false, and other configuration options - 2
Step2: Disable HTTP/2 protocol
Add cursor.general.disableHttp2: true to settings.json, or add --disable-http2 to startup parameters. This resolves Agent freeze issues caused by enterprise proxies not supporting HTTP/2 - 3
Step3: Handle SSL certificate issues
When encountering TLS handshake timeout or CERT_AUTHORITY_INVALID errors, import the enterprise root certificate into the system certificate store (use certmgr.msc on Windows, or security/update-ca-certificates commands on Mac/Linux), or temporarily set proxyStrictSSL: false - 4
Step4: Restart Cursor and verify connection
Completely close and reopen Cursor (not just refresh the window), then test if Agent functionality works properly. If issues persist, check if the proxy address and port are correct
FAQ
Why doesn't Cursor inherit system proxy settings?
Why doesn't the HTTP_PROXY environment variable work?
What should I do if Agent is stuck on Thinking?
How do I determine if it's a certificate issue or a proxy issue?
What scenarios is cursor-api-proxy suitable for?
6 min read · Published on: May 29, 2026 · Modified on: Jun 1, 2026
Cursor Complete Guide
If you landed here from search, the fastest way to build context is to jump to the previous or next post in this same series.
Previous
Stop Using Cursor Wrong! The Right Way to Use These 3 Core Features
What's the real difference between Chat, Composer, and Tab completion? When should you use each one? How to remember shortcuts without forgetting? What mistakes do beginners make? This article explains everything in plain English.
Part 3 of 25
Next
What Is Cursor Agent Mode? How It Works, When to Use It, and Best Practices
Trying to understand Cursor Agent Mode? This guide explains how it differs from Chat Mode, what tasks it handles well, and the rules, checkpoints, and workflows that make it reliable.
Part 5 of 25
Related Posts
Complete Guide to Cursor Agent Mode: Start AI-Powered Automation in 3 Steps (2026)
Complete Guide to Cursor Agent Mode: Start AI-Powered Automation in 3 Steps (2026)
Advanced Cursor Rules Configuration: Build Your Personal AI Coding Assistant
Advanced Cursor Rules Configuration: Build Your Personal AI Coding Assistant
Cursor @Codebase vs @Docs vs @Files: A Practical Decision Guide
Comments
Sign in with GitHub to leave a comment