A proxy server is an intermediate server that sits between the client computer and the internet. Generally, it is used in internal networks for unexpected access and to prevent attacks. It is also used to control internet access, bandwidth control, and content filtering and blocking.
In this tutorial, we will show you how to set up proxy settings and apt-proxy in Ubuntu 22.04 Server and Desktop system. The same steps are working on Ubuntu 20.04 as well.
Useful Links:
VPS/VDS - https://www.mivocloud.com/
Commands Used:
export HTTP_PROXY=username:password@proxy-server-ip:8181
export HTTPS_PROXY=username:password@proxy-server-ip:8182
nano ~/.bashrc
export http_proxy=username:password@proxy-server-ip:8181
export https_proxy=username:password@proxy-server-ip:8182
source ~/.bashrc
nano /etc/environment
export http_proxy=username:password@proxy-server-ip:8181
export https_proxy=username:password@proxy-server-ip:8182
source /etc/environment
nano /etc/apt/apt.conf.d/proxy.conf
Acquire::http::Proxy "http://username:password@proxy-server-ip:8181/";
Acquire::https::Proxy "https://username:password@proxy-server-ip:8182/";