Squid (caching) proxy has been used on the Internet for ages. The first release of Squid was back in the mid-90s!
Here is how you may use Squid as a proxy HTTP server with user and password authorization (it is easy to enable the caching, but we do not include such configuration). Our system is CentOS 7, but the configuration part is platform-independent, so just install it in your Linux distribution and use our configuration lines.
STEP 1) Install Squid
The instalation under CentOS 7
yum install squid
STEP 2) Squid configuration to use it as web caching proxy.
The configuration file is located in “/etc/squid/squid.conf” and you should add at the begging the following lines:
#MY ADITIONAL CONFIG visible_hostname srvname auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/pass.squid acl ncsa_users proxy_auth REQUIRED http_access allow ncsa_users auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/pass.squid