Closed fizbin closed 1 month ago
Can we change this Title for "socks5 proxy support for Docker"? ...this issue is not related only for MAC, it exists on Linux and Windows platforms also. In general, in every laboratory, or on enterprise intranet, where no any internet access only trough SOCKS5 proxy, this SOCKS5 proxy can be use only, but if it is not supported...
@bbaksa Docker for Linux has socks5 support. (this difference in support between Linux and platforms covered by Docker Desktop was part of the motivation for the original ticket)
If Docker Desktop for Windows similarly does not support socks5 (I don't use Windows, so don't know), then changing the title to "socks5 proxy support for Docker Desktop" makes sense.
@fizbin Hmmm, when I tried, it wasn't work for me, only with the workaround to create a proxy server on localhost.
I'm in the need for this as well to be able to reach some company internal servers from my Docker application. It works from my webbrowser and my Golang application natively on my Mac, but it doesn't work from my Docker container.
Yep, please support socks5 proxy. It is crucial for survival in mainland China. Thanks!
Also just figured out that this is not yet supported. Must have!
Any feedback on this one @412PIT?
This feature is necessary for my work, would very much appreciate it being worked on.
Please, for the love of god support this; aren't you expecting us to pay for this now?
The lack of support for SOCKS5 proxies is high on the list of blockers from our company adopting Docker Desktop for dev workstations.
Hi, I met this problem and spent hours on this issue ( socks5 proxy), I am using Win10, docker .
to resolve this, refer to: https://superuser.com/questions/423563/convert-http-requests-to-socks5
$ pip3 install pproxy
# assuming your socks5 proxy running at 127.0.0.1:9150
$ pproxy -r socks5://127.0.0.1:9150 -vv
then you will get an http proxy running at localhost:8080
then in your docker , set these variables: ( assuming your host ip is 192.168.10.3)
export HTTP_PROXY="http://192.168.10.3:8080"
export HTTPS_PROXY="http://192.168.10.3:8080"
export http_proxy="http://192.168.10.3:8080"
export https_proxy="http://192.168.10.3:8080"
Hi, I met this problem and spent hours on this issue ( socks5 proxy), I am using Win10, docker .
to resolve this, refer to: https://superuser.com/questions/423563/convert-http-requests-to-socks5
$ pip3 install pproxy # assuming your socks5 proxy running at 127.0.0.1:9150 $ pproxy -r socks5://127.0.0.1:9150 -vv
then you will get an http proxy running at localhost:8080
then in your docker , set these variables: ( assuming your host ip is 192.168.10.3)
export HTTP_PROXY="http://192.168.10.3:8080" export HTTPS_PROXY="http://192.168.10.3:8080" export http_proxy="http://192.168.10.3:8080" export https_proxy="http://192.168.10.3:8080"
Worked for me thanks a lot!
Hi, I met this problem and spent hours on this issue ( socks5 proxy), I am using Win10, docker .
to resolve this, refer to: https://superuser.com/questions/423563/convert-http-requests-to-socks5
$ pip3 install pproxy # assuming your socks5 proxy running at 127.0.0.1:9150 $ pproxy -r socks5://127.0.0.1:9150 -vv
then you will get an http proxy running at localhost:8080
then in your docker , set these variables: ( assuming your host ip is 192.168.10.3)
export HTTP_PROXY="http://192.168.10.3:8080" export HTTPS_PROXY="http://192.168.10.3:8080" export http_proxy="http://192.168.10.3:8080" export https_proxy="http://192.168.10.3:8080"
Thanks for this tip! To help avoid unwanted access to your proxy, I would configure pproxy to only listen on localhost, then you can use the special DNS entry host.docker.internal. So something like:
pproxy -r socks5://127.0.0.1:9150 -l http://127.0.0.1:8080
docker run -e HTTPS_PROXY=http://host.docker.internal:8080 ...
How soon will be released the feature supported to socks 5 proxy for Docker Desktop? Any schedules? @christophermclellan @bryansh
Hi, I have created a prototype development build if you'd like to give it a try:
The SOCKS feature is listed in the "Beta" features and should be enabled:
Afterwards it should be possible to manually set proxy URLs to socks5://host:port
.
Let me know what you think!
I tested the prototype and it works great for me ❤️
Good news! This is a beta feature that shipped with Docker Desktop 4.28.
To enable: Settings -> Features in Development -> Enable Socks5 proxy support
Tell us about your request Since Docker on linux supports socks5 proxies since at least 2017 (by setting the environment variable
https_proxy
to something likesocks5://127.0.0.1:1099
) it would be nice if Docker Desktop allowed specifying socks5 proxies by sayingsocks5://127.0.0.1:1099
in the "Manual Proxy Configuration" UI.Which service(s) is this request for? Docker Desktop for Mac. I don't use Windows, so I don't know whether it's needed there too.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Sometimes I wish to pull from a docker repo. that is only accessible from a group of machines that I can
ssh
to, but not directly network-accessible to me. When that's the case, on my linux desktop I can dossh -D 1099 -fCqN jumpbox
, then sethttps_proxy
as above and I'm able to usedocker login
anddocker pull
on that repo to get what I want.Sometimes though I'm not at my Linux desktop, and just have my Mac laptop. Although I could just ssh into the linux desktop and work there, I'd like to use docker locally. (e.g. when travelling, back in the pre-COVID-19 time when people could travel)
Are you currently working around the issue? What I have to do currently is start an https proxy on the
jumpbox
machine and usessh
to forward that specific port with something likessh -nC -L 3128:localhost:5502 jumpbox python simple_proxy.py 5502
and then set docker desktop to do usehttp://localhost:3128
as its https proxy.Additional context Based on some digging that people did for the docker-for-mac bug report https://github.com/docker/for-mac/issues/1238, I suspect that part of what's happening currently is logic that looks like this:
http_proxy
to "gateway.docker.internal:3128"And similarly for an https proxy. This leaves the docker running inside qemu thinking that it has an http proxy to talk to. Instead, I'd like to propose that docker use logic like this:
http_proxy
to "{PROTOCOL}gateway.docker.internal:3128", where {PROTOCOL} is the (protocol://) bit pulled off the manual proxy setting if it was there (and the empty string if not)(and similar logic for the https proxy)