рНВМЮ РЮЙЮЪ ФЕ ОПНАКЕЛЮ. мЮПНД ОНЛНЦХРЕ ЙРН ЛНФЕР СФЕ БЯЕ ОЕПЕОПНАНБЮК. мЮ ЬКЧГЕ ЯРНХР Mandrake 9.0 Б ЙЮВЕЯРБЕ ОПНЙЯХ Squid 2.4 Stable7 Б ПЕФХЛЕ transparent proxy. оНВЕЛС-РН НМ МЕ ОЕПЕДЮЕР ХМТНПЛЮЖХЧ МЮ redirector. Redirecto-rШ ЙПСРЪРЯЪ Б ОЮЛЪРХ. бЕКХЙНКЕОМН ПЮАНРЮЧР Я ЙНЛЮМДМНИ ЯРПНЙНИ, МН БНР НР squid-Ю МХВЕЦН МЮ МХУ МЕ ХДЕР..
мЮЯРПНИЙХ squid.conf ЯКЕДСЧЫХЕ:
http_port 3128
icp_port 3130
htcp_port 4827
# TAG: no_cache
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
# TAG: redirect_program
redirect_program /var/www/html/nobanners/redirector
# TAG: redirect_children
redirect_children 8
# TAG: redirect_rewrites_host_header
redirect_rewrites_host_header off
# TAG: acl
acl all src 0.0.0.0/0.0.0.0
acl inner src 192.168.97.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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
# TAG: http_access
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow inner
http_access deny all
# TAG: cache_effective_user
# TAG: cache_effective_group
cache_effective_user squid
cache_effective_group squid
# TAG: httpd_accel_host
# TAG: httpd_accel_port
httpd_accel_port 80
# TAG: httpd_accel_single_host on|off
httpd_accel_single_host off
# TAG: httpd_accel_with_proxy on|off
httpd_accel_with_proxy on
# TAG: httpd_accel_uses_host_header on|off
httpd_accel_uses_host_header on
# TAG: redirector_bypass
redirector_bypass on
мС Х мЮОПХЛЕП РЮЙНИ ПЕДХПЕЙРНП:
#!/usr/bin/perl
$0 = 'redirector' ;
$| = 1 ;
$SITE = 'http://localhost/nobanners' ;
while (<>) {
($url, $who, $ident, $method) = /^(\S+) (\S+) (\S+) (\S+)$/ ;
# Rambler Top100
$url = "$SITE/top100.gif" if $url =~ m%rambler\.ru/top100\.cnt\?% ;
print "$url $who $ident $method\n" ;
}