Just export these variables:
export http_proxy="socks5://127.0.0.1:1234"
export https_proxy="socks5://127.0.0.1:1234"
The above example uses a socks 5 proxy at localhost and port 1234.
This is a great way to improve performance of some activities for things like package installation, especially if your routing is not ideal to the repos.
linux, ubuntu, redhat, debian, http, https, proxy, yum, aptjust, export, variables, http_proxy, quot, https_proxy, localhost, improve, activities, installation, routing, ideal, repos,