Maybe it's useful to first summarize what a proxy server does. Very often, a system can connect to the internet directly. If that's the case, any program on that system can connect to the internet directly - a web browser, a mail client, apt
or anything else.
But there are also cases where a system can't or shouldn't directly connect to the internet. That could be because of how the local network is set up, for security reasons, to filter out unwanted content like ads, to ensure compliance to some kind of regulations or for other reasons.
If that's the case, you can use a proxy server. A proxy server is an intermediate that connects to a destination somewhere in the internet instead of you. Say, you want to visit askubuntu.com
in your web browser. If your system can connect to the internet directly, your browser can just connect to the server(s) askubuntu.com
is running on:
Your system --> askubuntu.com
If your system can't or shouldn't connect to the internet directly, you can use a proxy server as an intermediate. A proxy server basically takes your request and sends it to the intended destination:
Your system --> Proxy --> askubuntu.com
Additionally, a proxy server can check whether the connection is allowed by some kind of company rules, filter out malware and other unwanted content or perform other services.
So, a proxy server is only needed if you can't or shouldn't access the internet directly - that goes for systems as a whole as well as individual programs like apt
or others. Unless you have a specific reason to have apt
use a proxy server, you don't need to.
If you do want apt
to use a proxy server for a specific reason, you can do so with the Aquire
configuration described in the tutorial that you linked. But in this case, obviously the proxy server you want apt
to use needs to exist, to be reachable and so on.