• Docs
  • Docs
Quick Start
Agent setup
Claude Code setup
Codex setup
Cursor setup
Visual Studio Code Copilot setup
Web browser proxy setup
SDK setup
Vertex AI

Visual Studio Code Copilot setup

Copilot inherits the networking stack from Visual Studio Code. Route the editor through aiproxy to monitor and govern every Copilot request.

Prerequisites

  • aiproxy running locally (examples assume http://localhost:8080)
  • Complete the Quick Start → TLS certificate steps so your OS trusts the aiproxy certificate authority
  • Copilot enabled in Visual Studio Code (desktop or insider build)

macOS

  1. Open Visual Studio Code.
  2. Press ⌘, to open Settings.
  3. Search for Proxy.
  4. Set Application → Proxy (or http.proxy in JSON) to http://localhost:8080.
  5. Ensure HTTP: Proxy Support remains set to on.

Windows

  1. Open Visual Studio Code.
  2. Press Ctrl+, to open Settings.
  3. Search for Proxy and set Application → Proxy to http://localhost:8080.
  4. Verify HTTP: Proxy Support stays enabled.
  5. If Copilot fails to connect, open Settings → Network & Internet → Proxy in Windows and add the same proxy there to ensure Electron honors it.

Linux (native packages)

  1. Open Visual Studio Code and press Ctrl+,.
  2. Search for Proxy.
  3. Set Application → Proxy to http://localhost:8080.
  4. Confirm HTTP: Proxy Support is enabled.

Flatpak builds

Flatpak sandboxes do not see host certificates or environment variables by default. Perform these one-off steps:

  1. Copy the certificate into the sandbox:
    install -D -m 0644 ~/.aiproxy/aiproxy-ca-cert.pem \ /home/$USER/.var/app/com.visualstudio.code/data/certs/aiproxy-ca.pem
  2. Grant Visual Studio Code access and expose the CA to Electron/Node:
    sudo flatpak override \ --filesystem=/home/$USER/.var/app/com.visualstudio.code/data/certs/aiproxy-ca.pem:ro \ --env=ELECTRON_EXTRA_CA_CERTS=/home/$USER/.var/app/com.visualstudio.code/data/certs/aiproxy-ca.pem \ --env=NODE_EXTRA_CA_CERTS=/home/$USER/.var/app/com.visualstudio.code/data/certs/aiproxy-ca.pem \ com.visualstudio.code
  3. Import the CA into the sandbox NSS database used by Copilot:
    flatpak run --command=sh com.visualstudio.code -c ' mkdir -p $HOME/.pki/nssdb && certutil -d sql:$HOME/.pki/nssdb \ -A -t "C,," -n "aiproxy-ca" \ -i /home/$USER/.var/app/com.visualstudio.code/data/certs/aiproxy-ca.pem '
  4. Restart Visual Studio Code so overrides apply:
    flatpak kill com.visualstudio.code

After these steps, set Application → Proxy to http://localhost:8080 inside Visual Studio Code as described earlier.

Verify traffic reaches aiproxy

Open a Copilot chat or trigger inline suggestions. Watch the aiproxy terminal UI or logs for requests to api.*.githubcopilot.com. If you do not see traffic:

  • Reconfirm the proxy setting (http.proxy) in Visual Studio Code
  • Ensure the CA appears in your OS trust store (and inside the Flatpak sandbox if applicable) as described in the Quick Start guide
  • Restart Visual Studio Code after changing environment variables or trust settings

    On this page

  • Prerequisites
  • macOS
  • Windows
  • Linux (native packages)
  • Flatpak builds
  • Verify traffic reaches aiproxy