Copilot inherits the networking stack from Visual Studio Code. Route the editor through aiproxy to monitor and govern every Copilot request.
aiproxyrunning locally (examples assumehttp://localhost:8080)- Complete the Quick Start → TLS certificate steps so your OS trusts the
aiproxycertificate authority - Copilot enabled in Visual Studio Code (desktop or insider build)
- Open Visual Studio Code.
- Press
⌘,to open Settings. - Search for Proxy.
- Set Application → Proxy (or
http.proxyin JSON) tohttp://localhost:8080. - Ensure HTTP: Proxy Support remains set to
on.
- Open Visual Studio Code.
- Press
Ctrl+,to open Settings. - Search for Proxy and set Application → Proxy to
http://localhost:8080. - Verify HTTP: Proxy Support stays enabled.
- If Copilot fails to connect, open Settings → Network & Internet → Proxy in Windows and add the same proxy there to ensure Electron honors it.
- Open Visual Studio Code and press
Ctrl+,. - Search for Proxy.
- Set Application → Proxy to
http://localhost:8080. - Confirm HTTP: Proxy Support is enabled.
Flatpak sandboxes do not see host certificates or environment variables by default. Perform these one-off steps:
- 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 - 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 - 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 ' - 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.
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