To enable a socks5 proxy for any binaries, even these which doesn’t natively support a sock5 proxy, we could use proxychains.
First, we should install proxychains. For debian based linux system, you may run
(root)# apt install proxychains4
Please note, that tag proxychains means the older version 3, and tag proxychains4 means the later version 4 (also called proxychains-ng in some other platforms).
Then, please configure the proxy server in file /etc/proxychains.conf.
socks5 [ip-address] [port]
After that, the socks5 proxy could be fetched like,
$ proxychains [command]