Socks5.passwd based Authentication for Squid

Donwload: socks5_auth.pl

Usage:

1) Save the script in the file: /usr/local/sbin/socks5_auth.

2) Change the script's first line so it points to your Perl interpreter. (e.g. #! /usr/bin/perl)

3) chmod a+x /usr/local/sbin/socks5_auth

4) Add the following line to squid.conf file:
authenticate_program /usr/local/sbin/socks5_auth -passwd /etc/socks5.passwd -log /var/log/socks5_auth.log

5) Create a proxy_auth acl in squid.conf file.

NOTE:

The Squid user must be allowed to:

1) Read the /etc/socks5.passwd file.

2) Write to /var/log/socks5_auth.log