Para o proxy HTTP, use -x
.
Tenha um $HOME/.curlrc
com
-x 127.0.0.1:8080
ou crie aliases usando curl -x 127.0.0.1:8080 ...
para uso de proxy.
Para o proxy SOCKS, olhando para man curl
:
--socks5 <host[:port]> Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080. This option overrides any previous use of -x, --proxy, as they are mutually exclusive.
Então, use curl --socks5 127.0.0.1:8080
, ou seja. curl --socks5 $socks_proxy
.