Create a new file in the /etc/apt/apt.conf.d
for example: create the file 80proxy with
sudo nano /etc/apt/apt.conf.d/80proxy
and add the following lines to configure the proxy setting:
Acquire::http::Proxy "http://<username>:<password>@<proxy IP>:<port>";
Acquire::https::Proxy "http://<username>:<password>@<proxy IP>:<port>";
Acquire::ftp::Proxy "http://<username>:<password>@<proxy IP>:<port>";