Skip to content

Commit ab908e6

Browse files
committed
Add HTTPS Proxy Test (microsoft/vscode#235410)
1 parent 5407eba commit ab908e6

File tree

6 files changed

+41
-1
lines changed

6 files changed

+41
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mitmproxy-config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "mitmweb",
6+
"type": "shell",
7+
"command": "mitmweb --web-host '*'",
8+
"runOptions": {
9+
"runOn": "folderOpen"
10+
}
11+
}
12+
]
13+
}
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## HTTPS Proxy Test
2+
3+
- `Dev Containers: Reopen in Container` > `HTTPS Proxy Test`.
4+
- First time: Install the certificate from `.devcontainer/https-proxy-test/mitmproxy-config` in the OS and restart VS Code. See https://docs.mitmproxy.org/stable/concepts-certificates/#installing-the-mitmproxy-ca-certificate-manually.
5+
- Add the user setting `"http.proxy": "https://localhost:8080"`.
6+
- Install GitHub Copilot Chat and use `Developer: GitHub Copilot Chat Diagnostics` to test connections with a HTTPS proxy. Use a second window to test connections from a local extension host.
7+
- Verify in the log terminal of the dev container that the proxy is being used.
8+
9+
Note: Due to an issue in mitmproxy, Electron's `fetch` currently doesn't work. Add the user setting `"github.copilot.advanced.debug.useElectronFetcher": false` as a workaround.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "HTTPS Proxy Test",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "devcontainer",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}/.devcontainer/https-proxy-test"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3.4'
2+
3+
services:
4+
devcontainer:
5+
image: mitmproxy/mitmproxy
6+
volumes:
7+
- ../../..:/workspaces
8+
- ./mitmproxy-config:/root/.mitmproxy
9+
ports:
10+
- "127.0.0.1:8080:8080"
11+
- "127.0.0.1:8081:8081"
12+
command: sleep inf

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.vscode
21
node_modules
32
*.pem
43
out

0 commit comments

Comments
 (0)