��������� Squid ��� Windows XP/2003/Vista/7
����p: ������� �.�. | 26.04.2010
http://vasenin.org/pro-specialist/articles/76-squid-pod-windows-install.html
H� ����������� ���� ��������� ���������� ��p���� proxy-��p��p� Squid ���
Windows �������� 2.7.STABLE8. ������� ��� � �p���� ��p��� Squid ��� OS Windows
����� �����: http://squid.acmeconsulting.it/. ��� �� ����� ����� � ��p���
Squid 3.0., ���� ����������, �� ������� ������ <�����p�����������> � ��� ��
�����p�������� p��p���������. ������� ����������� �� ��p��� 2.7.STABLE8 � �����
p������p����� � ������ ������ ��.
http://squid.acmeconsulting.it/download/squid-2.7.STABLE8-bin.zip
��������� ����p������ � p������������ ��� � ����� c:\squid\
����� p��������� �� ������ ����� � ����� c:\squid\ ��������� ��p����p� ������:
\bin
\docs
\etc
\libexec
\sbin
\share
\system32
\var
ChangeLog
CONTRIBUTORS
COPYING
COPYRIGHT
CREDITS
QUICKSTART
README
SPONSORS
����p� ��������� squid ��� ��������� ������ Windows. ��� ����� ���������
��������� ��p��� � ����p��� � ��� �������:
c:\squid\sbin\squid -i -f C:\squid\etc\squid.conf -n Squid
����� ���������� ���� ������� �� ������ ������� ��������� ���������:
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\ConfigFile value
C:\squid\etc\squid.conf
Squid Cache version 2.7.STABLE7 for i686-pc-winnt
installed successfully as Squid Windows System Service.
To run, start it from the Services Applet of Control Panel.
Don't forget to edit squid.conf before starting it.
�.�. ������� ��������, ��� � ��������������� ��p����p p����p� ��������
p����������� �������p��������� ����� squid (C:\squid\etc\squid.conf), Squid
������� ���������� ��� ��p��� ��� Windows, � ����� ��� ������������, ����� ��
�� ������ ��p������p����� �������p�������� ���� squid.conf ��� ���� �������.
���������� ���� � ��������.
��p������ � ��p����p�� C:\squid\etc\ � ��p������������ ��� ����������� � ���
�����:
cachemgr.conf.default => cachemgr.conf
mime.conf.default => mime.conf
squid.conf.default => squid.conf
squid_radius_auth.conf.default - ����� �� ��p������������, ���� �� ��
�p����������� ������������ �������������� �� �p������� radius ��� �������������
�p����-��p��p� squid.
����� ���p����� � ����� ��������� p������p� ���� squid.conf. H���p���
���������� ����������� p������ �������p���� (� ���������� �� �������
������p���� � ��������p����� �������p���� ��� ���� �����). ����, � �����
squid.conf p����������p��� (���p��� ������ #) ��� ���������� ��������� ��p����:
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
# ��������� ���� ���� �� ������� ��� ����� ��������� ����, ���� �p����-��p��p
������������
# ������ �� ����� ������, �� ����p�� �� � ����������, �� ��� ������ �����
����������p�����
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#
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
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
# And finally deny all other access to this proxy
http_access deny all
# Allow ICP queries from local networks only
icp_access allow localnet
icp_access deny all
# # �p��������� ��p�, �� ����p�� ����� ����� ������� ���������� �� ��������.
http_port 3128
# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?
# Default:
cache_replacement_policy lru
# # �p��������� p����������� ��p����p��, � ����p�� ����� �p������ ��� ���:
cache_dir ufs c:/squid/var/cache 100 16 256
store_dir_select_algorithm least-load
max_open_disk_fds 0
minimum_object_size 0 KB
maximum_object_size 4096 KB
cache_swap_low 90
cache_swap_high 95
update_headers on
access_log c: /squid/var/logs/access.log squid
logfile_daemon c: /squid/libexec/logfile-daemon.exe
cache_log c: /squid/var/logs/cache.log
cache_store_log c: /squid/var/logs/store.log
logfile_rotate 10
emulate_httpd_log off
log_ip_on_direct on
mime_table c:/squid/etc/mime.conf
log_mime_hdrs off
pid_filename c:/squid/var/logs/squid.pid
log_fqdn off
strip_query_terms on
buffered_logs off
����� ��p����, �� ��p������� � �������p�������� ����� �p� ������� ����� -
��p������� �������� (�������, ��p��, acl-�����), ����p���� ����, ����p����
�����, � ����� ������p�� ��������� ����p���� (������, �� ��� ������������).
����� ��p����� �������� �� ��, ��� ���� � ������ ��p����p�� ����� ������ ������
�� ��������� ����p </>, � �� Windows - <\>.
����p� ���p��p��� ��p����p� ���� �p����-��p��p� squid, �������� �������:
c:\squid\sbin\squid -z -f C:\squid\etc\squid.conf
����� ���������� ���� ������� �� ������ ������� ��������� ���������:
Creating Swap Directories
�.�., ��� ������ ���-��p����p�� �������. ����� ��p����� �������� �� ��, ��� �p�
���������� ���� ������� ����� �p���p��� �������p�������� ���� squid.conf ��
��pp��������, � ���� � ��� ���-�� �������� �� ���, � �������� ��
��������������� ���������. ��� �������� ���-����� �� ������������ ��� ��������
������� ufs (����� � ����. ����� - cache_dir ufs c:/squid/var/cache 100 16
256). ����� ����� ������������ ��� awin32, ������p��� ������������ � ����p���
�������� ���������� ��� ���. ����� ������� ��������� � ���-����
C:\squid\var\logs\cache.log � ������p��� ��� �� ��� �����-���� ������.
����p� ������ ��p��� �p����� ���p� �p����-��p��p� �����. �������� ��� ���
������ � ���� ����������� �p�������� - � ������ �����-���� ������ ��� �����
�������� �� ��p�� � ����� ����� ���p����� �������������� ����� �
�������p�������� �����.
start c:\squid\sbin\squid -f C:\squid\etc\squid.conf
��� �������, ������ ������� �� ����p������� �� ��p���. �� ����, ����p� ���
Squid ����� �p����� ��p���� �������. ���p����� � ���� ��p�������, ��������
�������:
telnet localhost 3128
��� �������, �� ��� ����p����� <�p���������>, �.�. ����� �� ��p� 3128, ����p��
�� ��������p�p����� p���� ��� �p���� ���������� ���p���� �� �p������� http,
������� ������ ����������� ������ �� ��p�� �� ����. ����p� ����� ���p�������
����p���� �p����p.
�������� ����p������� => ����������� => H���p���� ��p����p�� ��������� ���� =>
H���p���� ���� => �p����-��p��p => => ������������ �p����-��p��p ��� ���������
����������� => ��p��: localhost => ��p�: 3128 => H� ������������ �p����-��p��p
��� ��������� ��p���� => ��.
�p����� ����� �� ����� ���� ��p������, ���p���p http://vasenin.org. �p� ������
����p���� ���� �p����-��p��p ��������� �� ��� �� ������ � ����p�� �� ���������
����� � ����p���, �� �������� ������ �������. ����� ��� ���p����� ������� �
�������p�������� ���� ��p����:
acl localnet src 127.0.0.1/32
����p� � � ����� ������, �� ����p�� ���������� �p����-��p��p, ����� <������> �
����p���.
����p� ��� �������� ����������p����� �p����� �������/��������� �p����-��p��p�
Squid. ���� �����p����, ��� proxy-��p��p ����� p������� ���������, �� �����
�p���� ���������� � ������ Squid ��� windows ��p����p <����������>.
���� �� �����p���� ��������� �p���� �p��� �� �p�����, �� ����� ������� ��p�
bat-������ �� ���� ������:
���� start_squid.bat
net start Squid
���� stop_squid.bat
net stop Squid
���� restart_squid.bat
net stop Squid
net start Squid
���! ����� p�������. �������� ����� ����������� ������� ������������ �� Squid �
����p���� �p����-��p��p ���������� ��� ���� ����� � ������� ���������!
H���p���� � ����������� Squid �������� ��������� � ����� ����p��� �����,
����p�� �� ������ � p���� ������ ������. ����p���� �� ��� �������� �� ���� �
����p�����.
��������p��
#8 Antoni 2010-11-12
"� � �p�����p������ p����� ����� ����p���� Squid ��� Windows ?"
� Squid 3 �����:
http_port 192.168.50.1: 3128 transparent
� ���� ����� ����p������ �p� ����, �� ��� ���:
auth_param basic program /usr/lib/squid/ncsa_auth /your/path/internet_users
auth_param basic children 6
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl lan src 192.168.50.0/24
acl lan proxy_auth REQUIRED
http_access allow lan
http_access deny all
Bye