I have done setting up a squid proxy server with username and password. It authenticates when opening browser for username and password. It works great in browsers. But in terminal, i want to access the commands using proxy server. Instead of exporting proxy setting to the system file, I want to access it with the proxy url.
http://username:password@proxyhost:3128 sudo apt-get update
How can i do that. I want this for further processing in my python program