Running squid as user on Debian

Install the required packages:

$ sudo apt-get install squid fakeroot

Create the $HOME/.squid/squid.conf file:

pid_filename none
cache_peer parent 3128 0 login=mylogin:mypassword no-query connect-timeout=100 proxy-only
cache_dir ufs @HOME@/.squid/cache 100 16 256
cache_log @HOME@/.squid/cache.log
access_log @HOME@/.squid/access.log
http_access allow all
never_direct allow all
http_reply_access allow all
forwarded_for delete

Replace @HOME@ by your home directory, don’t use $HOME as this is not a shell script. Add what you want from /etc/squid/squid.conf or

Create cache directories:

$ fakeroot /usr/sbin/squid -f $HOME/.squid/squid.conf -z -N

To run it normally just do:

$ fakeroot /usr/sbin/squid -f $HOME/.squid/squid.conf -N

I’m using squid as a flexible alternative to cntlm.

#debian, #network, #squid