Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit bf50818

Browse files
committed
Ignore DOCKER_HOST entirely if it's set to an SSH URL
1 parent f9191c4 commit bf50818

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/interceptors/docker/docker-interception-services.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ export async function startDockerInterceptionServices(
4040
httpsConfig: { certPath: string, certContent: string },
4141
ruleParameters: { [key: `docker-tunnel-proxy-${number}`]: ProxySettingCallback }
4242
) {
43+
// For now we don't support SSH-based Docker connections at all - for starters,
44+
// they won't be able to use the file system references we set up. If you try
45+
// to set one, we just ignore it.
46+
if (process.env.DOCKER_HOST?.startsWith('ssh://')) {
47+
console.log(`Ignoring unsupported DOCKER_HOST value: ${
48+
process.env.DOCKER_HOST
49+
}`);
50+
delete process.env.DOCKER_HOST;
51+
}
52+
4353
// Prepare (pull) the tunnel image, but we don't actually start the tunnel itself until some
4454
// Docker interception happens while HTTP Toolkit is running - e.g. proxy use, container attach,
4555
// or an intercepted container connecting to a network.

0 commit comments

Comments
 (0)