desktop-linux icon indicating copy to clipboard operation
desktop-linux copied to clipboard

socks5 proxy not working

Open videni opened this issue 3 years ago • 3 comments
trafficstars

My case is very similar to this [Use socks5 proxy from host for docker build]. How can I make the run wget -c abc.com/t.exe command to use proxy ?

First try

# step 1:  add environment
# /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTPS_PROXY=socks5://127.0.0.1:1089"
Environment="HTTP_PROXY=socks5://127.0.0.1:1089"

# step 2: restart service

sudo systemctl daemon-reload
sudo systemctl restart docker

# step 3: check

sudo systemctl show --property=Environment docker

Then run

docker info // I can see the http and https proxy turned into socks5://127.0.0.1:1089
docker build --network=host   .   // but run this command, I didn't see any traffic through  socks5://127.0.0.1:1089

Second try

~/.docker/config.json

{
 "proxies":
 {
   "default":
   {
     "httpProxy": socks5://127.0.0.1:1089",
     "httpsProxy": "socks5://127.0.0.1:1089"
   }
 }
}

Then run

docker build --network=host   .   //  got unsupported proxy configured: socks5://127.0.0.1:1089.

videni avatar Aug 12 '22 08:08 videni

@thaJeztah should we move this to moby/moby?

aiordache avatar Oct 21 '22 09:10 aiordache

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott avatar Feb 28 '23 01:02 docker-robott

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robot[bot] avatar Jun 23 '23 01:06 docker-robot[bot]