AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Configure Supermaven and sm-agent Behind Corporate Proxies and SSL Firewalls

Annett von Lucke · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Software engineers operating within corporate networks, financial institutions, and regulated cloud perimeters frequently run into a frustrating roadblock when deploying Supermaven: inline code suggestions fail silently or freeze on Supermaven initializing. In the editor logs, a recurring diagnostic trace reveals the exact failure point:

INFO  [sm_agent] Starting sm-agent
INFO  [sm_agent::edge_connection] Starting new edge connection
ERROR [sm_agent::edge_connection] connection init timed out (5s)
INFO  [sm_agent::edge_connection] websocket closed - shutting down EdgeConnection

Standard web browsing and standard IDE extensions might work through the company gateway, yet Supermaven fails completely. Understanding why this happens requires examining the network architecture of Supermaven. Resolving it demands a systematic pipeline that bridges local terminal environment variables, custom root certificates for SSL inspection, and perimeter network policies.

365Finds delivers our institutional verdict: Enterprise infrastructure teams should treat *.supermaven.com with an SSL Decryption Bypass (No-Decrypt) rule and allow persistent WebSocket connections over TCP port 443. Relying exclusively on end-user proxy tunneling hacks introduces friction and instability. However, when working on managed workstations without immediate perimeter changes, developers can achieve seamless connectivity by following the four-stage penetration configuration outlined below.


Architectural Root Cause: Why sm-agent Breaks Behind Corporate Firewalls

Most AI code assistants in VS Code or JetBrains communicate via standard HTTPS REST endpoints managed directly by the editor runtime (such as Node.js or the Chromium network stack). When you configure proxy settings in your IDE UI (http.proxy), the editor forwards those REST calls through the proxy automatically.

Supermaven operates on a fundamentally different, ultra-low-latency architecture:

  1. Native Sidecar Binary (sm-agent): When you launch your editor (VS Code, JetBrains, Zed, or Neovim via supermaven-nvim), the extension spawns a compiled Rust daemon called sm-agent as a local subprocess.
  2. Local Stdio IPC: Communication between your editor and sm-agent occurs strictly over local standard input/output (stdio IPC), exchanging JSON newline-delimited messages representing file buffers, cursor positions, and completion diffs.
  3. Outbound Persistent WebSocket (wss://): To deliver sub-second generation speeds across its 1-million-token context window without repeated TLS handshake overhead, sm-agent establishes a direct, persistent TLS WebSocket connection (edge_connection) to Supermaven edge servers on TCP port 443.

This architectural design creates four primary failure modes inside corporate networks:

Network BarrierFailure MechanismObserved Symptom
GUI Environment IsolationSubprocesses spawned by GUI editors do not inherit terminal shell exports (~/.bashrc / ~/.zshrc).connection init timed out (5s)
Proxy Protocol GapThe native Rust binary sm-agent may bypass or fail to parse complex HTTP CONNECT tunneling parameters.websocket closed - shutting down EdgeConnection
SSL Deep Packet Inspection (DPI)Middleboxes (Zscaler, Blue Coat, Fortinet) terminate TLS and sign with an enterprise internal root CA untrusted by sm-agent.TLS handshake abort / certificate verification failure
WebSocket Filtering & TimeoutGateways strip HTTP Upgrade headers or terminate idle TCP connections after 30 to 60 seconds.Repeated reconnect loops every minute

Stage 1: Configure Proxy Environment Variables and Shell Inheritance

To force sm-agent to recognize your corporate forward proxy, export standard proxy variables across your system and shell configuration.

1. Define Dual-Case Proxy Variables

Certain compiled binaries parse uppercase environment variables, while others look only for lowercase variables. Always export both sets in your profile (~/.bashrc, ~/.zshrc, or /etc/environment):

# Corporate HTTP / HTTPS Forward Proxy
export HTTP_PROXY="http://proxy.corp.internal:8080"
export HTTPS_PROXY="http://proxy.corp.internal:8080"
export http_proxy="http://proxy.corp.internal:8080"
export https_proxy="http://proxy.corp.internal:8080"

# Optional SOCKS5 Proxy (if routing through internal SOCKS)
export ALL_PROXY="socks5://proxy.corp.internal:1080"
export all_proxy="socks5://proxy.corp.internal:1080"

# Whitelist internal domains to prevent routing local IPC through proxy
export NO_PROXY="localhost,127.0.0.1,.corp.internal,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
export no_proxy="localhost,127.0.0.1,.corp.internal,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"

Special Character Handling: If your corporate proxy requires authentication (http://user:password@proxy:port), percent-encode special characters in your password (e.g., @ becomes %40, # becomes %23). Raw special characters will cause sm-agent's URI parser to abort.

2. Launch Editors Directly from the Authenticated Shell

On macOS and Linux desktops, launching VS Code or Zed from the operating system dock or application menu launches the binary under launchd or systemd --user, where your .bashrc or .zshrc exports are ignored.

To guarantee that sm-agent inherits the proxy configuration:

# Launch VS Code from an initialized terminal
code .

# Launch Zed from terminal
zed .

# Launch Neovim from terminal
nvim .

Stage 2: Trust Corporate Root Certificates (Overcoming SSL Inspection)

When enterprise firewalls inspect encrypted traffic via SSL Deep Packet Inspection (DPI), they intercept the outbound TLS handshake destined for supermaven.com and present an internally generated certificate signed by the company's private Certificate Authority (CA).

Because sm-agent is a standalone native binary compiled with modern Rust TLS crates, it relies on system certificate stores or specific OpenSSL bundle paths. If it cannot verify the certificate chain against trusted roots, the TLS handshake fails instantly.

1. Export the CA Bundle to OpenSSL and Node Environments

Locate your organization's custom root CA bundle file (usually provided by your IT security portal as a .pem or .crt file, e.g., /etc/ssl/certs/corporate-root-ca.pem). Export the certificate path to standard variables:

# OpenSSL / Rust native-tls certificate paths
export SSL_CERT_FILE="/etc/ssl/certs/corporate-root-ca.pem"
export SSL_CERT_DIR="/etc/ssl/certs"

# VS Code and Node.js extension host root CA support
export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/corporate-root-ca.pem"

# cURL and Python fallback
export CURL_CA_BUNDLE="/etc/ssl/certs/corporate-root-ca.pem"
export REQUESTS_CA_BUNDLE="/etc/ssl/certs/corporate-root-ca.pem"

Add these lines to your ~/.zshrc or ~/.bashrc.

2. Install the Corporate CA into the Operating System Trust Store

Ensuring the OS trust store recognizes the certificate provides a permanent foundation:


Stage 3: Transparent Tunneling Fallbacks (Proxychains and SOCKS5)

In scenarios where specific releases of sm-agent do not honor HTTP CONNECT proxies for WebSocket connections, developers must enforce process-level traffic redirection.

Method A: Process Interception via proxychains-ng

proxychains-ng intercepts dynamic socket API calls via LD_PRELOAD (Linux) or DYLD_INSERT_LIBRARIES (macOS), redirecting TCP traffic through an explicit proxy without requiring binary-level cooperation.

  1. Install proxychains-ng (e.g., brew install proxychains-ng or sudo apt install proxychains4).
  2. Configure /etc/proxychains.conf or ~/.proxychains/proxychains.conf:
    strict_chain
    proxy_dns
    tcp_read_time_out 15000
    tcp_connect_time_out 8000
    
    [ProxyList]
    # Proxy protocol   Host                   Port   User     Password
    http               proxy.corp.internal    8080
    # or socks5        127.0.0.1              1080
    
  3. Launch Neovim or the editor process under proxychains4:
    proxychains4 nvim
    
    All child processes, including sm-agent, will have their outbound socket calls routed directly through the designated corporate proxy.

Method B: System-Level TUN Mode (Zscaler / Clash / Tun2socks)

If your corporate workstation uses enterprise network agents such as Zscaler Client Connector or a local SOCKS5 tunnel, configure transparent TUN mode. A virtual network interface routes all TCP/UDP traffic at the kernel level, eliminating the need to configure individual applications or sidecar processes.


Stage 4: Enterprise Infrastructure & DevOps Firewall Rules

At 365Finds, our primary recommendation for platform engineering and IT SecOps teams is to implement official network allowlist rules. Bypassing SSL inspection for trusted development tools prevents broken WebSocket framing and keeps local developer machines free of fragile workarounds.

Submit a network change request to your enterprise network security team with the following operational specification:

Destination Hostnames:
  - supermaven.com
  - *.supermaven.com
  - download.supermaven.com (Asset / Agent Distribution)

Destination Port:
  - TCP 443 (HTTPS and Secure WebSockets)

Protocol Permissions:
  - HTTP/1.1 Upgrade to WebSocket (wss://)
  - HTTP/2

Proxy & Firewall Inspection Exceptions:
  - Enable SSL Decryption Exemption / No-Decrypt Policy for *.supermaven.com
  - Increase TCP / WebSocket idle session timeout to >= 300 seconds (prevent 5s/60s drop)
  - Preserve "Upgrade: websocket" and "Connection: Upgrade" headers in HTTP CONNECT handshakes

Why SSL Decryption Bypass is Essential for Supermaven

Certain deep packet inspection engines strip proprietary or non-standard WebSocket frames, misinterpreting low-latency streaming tokens as protocol anomalies. Granting *.supermaven.com an explicit exemption under your enterprise web security gateway (e.g., Zscaler SSL Inspection Policy, Palo Alto Decryption Policy, or Symantec Web Gateway) restores 100% completion reliability with zero client-side friction.


Stage 5: Manual Offline Provisioning of sm-agent

Corporate firewalls frequently block the initial download of the sm-agent binary during plugin installation, leaving your editor permanently stalled on Supermaven initializing.

When automatic fetching fails, provision the binary manually:

1. Locate the Expected Installation Path

2. Manual Deployment Steps

  1. Download the matching sm-agent binary for your OS and architecture (Linux x86_64/ARM64, macOS Apple Silicon/Intel, Windows x64) from an unrestricted machine or authorized internal mirror.
  2. Place the executable into the editor's designated directory.
  3. Grant execution permissions:
    chmod +x ~/.local/share/nvim/supermaven/sm-agent
    
  4. Verify manual execution in the terminal:
    ~/.local/share/nvim/supermaven/sm-agent --version
    

Diagnostic Verification and Log Inspection

Once configurations are in place, verify the connection using built-in editor diagnostics and network probing tools.

1. Inspect Supermaven Editor Logs

2. Command-Line Connectivity Test

Verify that your workstation can establish a secure TLS handshake to Supermaven using the specified CA bundle and proxy:

# Test HTTPS connectivity via proxy with custom CA
curl -x http://proxy.corp.internal:8080 \
     --cacert /etc/ssl/certs/corporate-root-ca.pem \
     -Iv https://supermaven.com

# Test direct TLS handshake and inspect presented certificate chain
openssl s_client -connect supermaven.com:443 -servername supermaven.com \
                 -CAfile /etc/ssl/certs/corporate-root-ca.pem

If the OpenSSL verify return code is 0 (ok), your certificate chain and proxy route are clean. Restart your editor to start receiving high-speed inline code suggestions immediately.


References