I have a SOCKS proxy that is accessible at 192.168.0.17:1080
in my local network. I redirected my internet traffic to it in my Wifi System Preferences. This works fine, GUI applications use it. However I'm not able to use the proxy inside the terminal through environment variables. Only setting it explicitly works.
In other words, this works
curl --socks5-hostname 192.168.0.17:1080 https://apple.stackexchange.com
But this doesn't work
# exports are also in ~/.zshrc
export HTTP_PROXY="socks5://192.168.0.17:1080"
export http_proxy="socks5://192.168.0.17:1080"
export HTTPS_PROXY="socks5://192.168.0.17:1080"
export https_proxy="socks5://192.168.0.17:1080"
export ALL_PROXY="socks5://192.168.0.17:1080"
curl https://apple.stackexchange.com
This is not just the case for curl
but also other applications such as git
.