Does apt-get have a .conf file in /etc that you can set this in? For example, I use slackpkg sometimes (Slackware) and in /etc/slackpkg/slackpkg.conf is a WGETFLAGS variable for passing options to wget:
Code:
WGETFLAGS="--passive-ftp --proxy-user=username --proxy-password=somepass"
You can also set environment variables that apps can check. For example:
Code:
export http_proxy=http://proxy.somedomain.com:3128
export ftp_proxy=http://proxy.somedomain.com:3128
If apt-get uses wget but doesn't provide access to wget flags or use environment variables you can modify /etc/wgetrc to add proxy variables. You can add entries there for http_proxy and ftp_proxy.
It's not Ubuntu specific, but I hope that helps...