gsettings set org.gnome.system.proxy use-same-proxy 'true'
gsettings set org.gnome.system.proxy.http authentication-password 'PASSWORD'
gsettings set org.gnome.system.proxy.http authentication-user 'USERNAME'
gsettings set org.gnome.system.proxy.http host 'PROXY_IP'
gsettings set org.gnome.system.proxy.http port 'PROXY_PORT'
gsettings set org.gnome.system.proxy.http use-authentication 'true'
gsettings set org.gnome.system.proxy.http enabled 'true'
export http_proxy=http://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT/
export https_proxy=https://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT/
/etc/apt/apt.conf
Acquire::http::proxy "http://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT/";
Acquire::https::proxy "https://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT/";
Acquire::ftp::proxy "ftp://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT/";
Acquire::socks::proxy "socks://USERNAME:PASSWORD@PROXY_IP:PROXY_PORT/";
Acquire::::proxy "true";