Repository: vscode
Issue: Setting http.proxy in Client VSCode will affect Copilot running in SSH - Remote server.
Labels: feature-request,network

<!-- Please search existing issues to avoid creating duplicates -->
<!-- Please attach logs to help us diagnose your issue -->

Setting http.proxy in Client VSCode will affect copilot running in SSH - Remote server.


- Copilot Chat Extension Version: v1.219.0
- VSCode Version: 1.93.0-insider (user setup)
- Logs:
```
2024-08-05 11:28:35.616 [error] [auth] auth: FetchError: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:7890
    at fetch (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachingFetch (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at XO.fetch (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/lib/src/network/helix.ts:96:22)
    at fetchCopilotToken (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/lib/src/auth/copilotToken.ts:197:16)
    at authFromGitHubToken (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/lib/src/auth/copilotToken.ts:130:22)
    at auth (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/extension/src/auth.ts:40:25)
    at authShowWarnings (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/extension/src/auth.ts:131:25)
    at EM.getCopilotToken (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/extension/src/auth.ts:174:33)
    at attemptAuthentication (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/extension/src/auth.ts:58:9) {
  type: 'system',
  _name: 'FetchError',
  code: 'ECONNREFUSED',
  errno: -111,
  erroredSysCall: 'connect'
}
2024-08-05 11:28:35.737 [error] [auth] tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:7890
2024-08-05 11:28:35.907 [error] [default] Error sending telemetry FetchError: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:7890
    at fetch (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachingFetch (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at XO.fetch (/home/ubuntu/.vscode-server-insiders/extensions/github.copilot-1.219.0/lib/src/network/helix.ts:96:22) {
  type: 'system',
  _name: 'FetchError',
  code: 'ECONNREFUSED',
  errno: -111,
  erroredSysCall: 'connect'
}
```

Steps to Reproduce:

1. Install VSCode Insiders and start with pure profile.
2. Set `"http.proxy": "http://127.0.0.1:7890"` in client VSCode
3. Prepare an test SSH - Remote server, and Connect to it
4. Install Copilot on server VSCode
5. It throws error: `Error sending telemetry FetchError: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:7890`
6. Unset `"http.proxy": "http://127.0.0.1:7890"` in client VSCode
7. The error disappeared.

Here is the video:

https://github.com/user-attachments/assets/659836d0-78ab-4517-af4d-7902ef535bdd