How to bypass proxy with sudo apt-get update

I was struggling with this because I was configuring my http_proxy, https_proxy and ftp_proxy using export but when I was doing sudo apt-get udpate, nothing happened. Did some research on StackOverflow and found the solution. So I’m keeping the solution here for future reference. This problem happens because in some releases sudo is configured in such a way that all environment variables all cleared when running the command.

My proxy don’t have authentication so I did:

After that I did:

There is a line that states:

After that line just add:

Voilá. Things will start working now.