Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add -proxy input to configure containerd for windows #6609

Open
jiefenghe opened this issue Mar 3, 2022 · 3 comments
Open

add -proxy input to configure containerd for windows #6609

jiefenghe opened this issue Mar 3, 2022 · 3 comments

Comments

@jiefenghe
Copy link

What is the problem you're trying to solve

When trying to set up proxy for containerd service in windows, there's multiple options so far

  1. set machine level environment variable
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "...", [System.EnvironmentVariableTarget]::Machine)

This is undesired because we might accidentally disclose credentials of the proxy.

  1. set process level environment variable

Drive a new service class from System.ServiceProcess.ServiceBase in C#, and then inject the proxy values into c# source code, and then compile and execute that wrapped containerd as the windows service.

But this workaround is cumbersome.

Describe the solution you'd like

Can we provides a way to config proxy for containerd service.

containerd.exe --register-service -proxy ...

Additional context

No response

@jiefenghe jiefenghe changed the title add -proxy input to configure containerd add -proxy input to configure containerd for windows Mar 3, 2022
@kzys kzys added the platform/windows Windows label Mar 3, 2022
@kzys
Copy link
Member

kzys commented Mar 4, 2022

Setting the environment variable from containerd itself may break if containerd's dependencies make HTTP calls in Go's init(). So the wrapper approach is technically safer.

That being said, I can agree having the flag is convenient.

@dstoffel
Copy link

dstoffel commented Jun 30, 2023

Hi,

We tried to use [Environment]::SetEnvironmentVariable("HTTP_PROXY", "...", [System.EnvironmentVariableTarget]::Machine) + HTTPS and restart containerd srevices to use our proxy but containerd always try a direct connection. (v1.6.18-1-gdbc99e5b1)

How should we use a proxy on windows ?

Thanks,
Davy

@kkbruce
Copy link

kkbruce commented Jul 25, 2023

This is like my issue #8846

We use a software Proxy client (proxifier) on Windows, but containerd still takes the ByPass route. There is no way to set a Proxy in Windows like Linux sets http-proxy.conf. This bothers us very much.

[07.25 13:01:56] containerd.exe (3512, System) - registry-1.docker.io(44.205.64.79):443 system connection bypassed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants