Docker container env has "no_proxy" as a blacklist, but no "only_proxy" as whitelist

Viewed 242

Docker support 4 types of proxy with ENV setting. HTTP_PROXY, HTTPS_PROXY, NO_PROXY, FTP_PROXY.

https://docs.docker.com/network/proxy/#configure-the-docker-client

If I set --env to HTTP_PROXY="socks5://127.0.0.1:3001". All HTTP traffic will go through socks proxy. And NO_PROXY is a blacklist. I just want to let some domains like google.com twitter.com using proxy and others are not. How I can do that? Any info is appreciated.

0 Answers
Related