Доброго времени суток. Поднял сквид (версия 3.4.8), вот конфиг:
auth_param basic program /usr/lib/squid3/basic_db_auth --user squid1 --password qwerty --plaintext --persist
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off
acl db-auth proxy_auth REQUIRED
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
#acl Safe_ports port 70 # gopher
#acl Safe_ports port 210 # wais
#acl Safe_ports port 1025-65535 # unregistered ports
#acl Safe_ports port 280 # http-mgmt
#acl Safe_ports port 488 # gss-http
#acl Safe_ports port 591 # filemaker
#acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow db-auth
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_port 3128
cache_mem 256 MB
maximum_object_size_in_memory 512 KB
maximum_object_size 120480 KB
cache_dir ufs /var/spool/squid3 5000 32 256
cache_swap_low 90
cache_swap_high 95
logfile_rotate 5
coredump_dir /var/spool/squid3
url_rewrite_program /usr/bin/sams2redir
url_rewrite_children 5
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname squidproxy
icp_port 0
dns_nameservers 192.168.1.87
Настроил по мануалу http://wiki.squid-cache.org/ConfigExamples/Authenticate/Mysql База:
create database squid;
grant select on squid.* to squid1@localhost identified by 'qwerty';
CREATE TABLE `passwd` (
`user` varchar(32) NOT NULL default '',
`password` varchar(35) NOT NULL default '',
`enabled` tinyint(1) NOT NULL default '1',
`fullname` varchar(60) default NULL,
`comment` varchar(60) default NULL,
PRIMARY KEY (`user`)
);
insert into passwd values('admin','password',1,'Admin','for testing purpose');
Сохраняю конфиг, перезапускаю сквид, прописываю прокси в свойствах обозревателя, ввожу адрес в браузере, появляется форма авторизации, ввожу admin password и ничего не происходит, снова вылазит пустая форма авторизации.
Логи:
1486098667.713 0 192.168.1.5 TCP_DENIED/407 4037 GET http://linux.org/ - HIER_NONE/- text/html
1486098673.512 8 192.168.1.5 TCP_DENIED/407 4094 GET http://linux.org/ admin HIER_NONE/- text/html
1486098685.770 4 192.168.1.5 TCP_DENIED/407 4094 GET http://linux.org/ admin HIER_NONE/- text/html