For general use the following ENV variables:
bash -c "cat > /etc/profile.d/proxy.sh" <<'EOF'
export ftp_proxy=ftp://forward-proxy.example.com:3128
export http_proxy=http://forward-proxy.example.com:3128
export https_proxy=http://forward-proxy.example.com:3128
export socks_proxy=http://forward-proxy.example.com:3128
EOF
Most utilities will look for these variables and use the configured proxy if available.
Known utilities
APT will utilize the latter environment variables, BUT I prefer to explicitly add my proxy to the APT config for the “safety” of it.
bash -c "cat > /etc/apt/apt.conf.d/99-httpProxy" <<'EOF'
Acquire::http::Proxy "http://forward-proxy.example.com:3128";
EOF