You should add your proxy config to /etc/apt/apt.conf
Acquire::http::Proxy "http://proxy-ip-or-hostname:port";
eg:
Acquire::http::Proxy "http://192.168.0.1:3128";
or with authentication
Acquire::http::Proxy "http://user:pass@192.168.0.1:3128";