{"id":408590,"date":"2024-06-29T20:15:28","date_gmt":"2024-06-29T20:15:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=408590"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T20:15:28","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=408590","title":{"rendered":"<span>\u0411\u043e\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 Squid 5.2 \u0441 \u043d\u0443\u043b\u044f \u0447.4<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u0430\u043d\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 + \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 SqStat + \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/h2>\n<p>\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u043a\u043e\u043b\u043b\u0435\u0433\u0438. \u041f\u043e \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c \u0442\u0440\u0443\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0443\u0447\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443.<\/p>\n<h3>\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u0430\u043d\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0430\u043d\u043a\u0438 \u043d\u0435 \u0434\u0430\u044e\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u043e\u0440\u0442\u044b \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Ammyy Admin) \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0434 \u0444\u0438\u043b\u044c\u0442\u0440 \u0438 \u043a\u043e\u043d\u043d\u0435\u043a\u0442 \u0441 \u0438\u0445 ip \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 squid.conf \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u00ab#\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0430\u0439\u0442\u043e\u0432\u00bb \u0438 \u00ab#IP \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u00bb \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<p><u>\u0414\u043b\u044f \u043f\u043e\u0440\u0442\u043e\u0432 \u0431\u0430\u043d\u043a-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432<\/u><\/p>\n<p><code>acl port_allowed port 80\u00a0\u00a0\u00a0\u00a0# Port HTTP<\/code><\/p>\n<p><code>acl port_allowed port 443\u00a0\u00a0\u00a0# Port HTTPS<\/code><\/p>\n<p><code>acl port_allowed port 9443\u00a0\u00a0# Port Sberbank biz<\/code><\/p>\n<p><em>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0438.<\/em><\/p>\n<p><u>\u0414\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0431\u0430\u043d\u043a\u043e\u0432<\/u><\/p>\n<p><code>acl dst_sber dst 92.38.2.0\/24<\/code><\/p>\n<p><code>acl dst_direct dstdomain .sbis.ru<\/code><\/p>\n<p><u>\u0414\u043b\u044f Ammyy Admin<\/u><\/p>\n<p><code>acl dst_ammyynet dstdomain .ammyy.com<\/code><\/p>\n<p><code>acl dst_ammyynet_ip dst 23.111.200.0\/24<\/code><\/p>\n<p><u>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b <\/u><strong><u>http_access<\/u><\/strong><u> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438:<\/u><\/p>\n<p><code>http_access deny !port_allowed       # \u0414\u043b\u044f \u043f\u043e\u0440\u0442\u043e\u0432<\/code><\/p>\n<p><code>http_access allow dst_direct         # \u0414\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441\u0431\u0438\u0441\u0430<\/code><\/p>\n<p><code>http_access allow dst_sber           # \u0414\u043b\u044f \u0441\u0431\u0435\u0440\u0430<\/code><\/p>\n<p><code>http_access allow dst_ammyynet       # \u0414\u043b\u044f ammyy admin<\/code><\/p>\n<p><code>http_access allow dst_ammyynet_ip    # \u0414\u043b\u044f ammyy admin<\/code><\/p>\n<hr\/>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 SqStat<\/h2>\n<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 Squid, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0435\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0438 \u0442.\u043f. \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: ScreenSquid.<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Apache2 \u0438 php<\/p>\n<p><code>sudo apt install -y apache2 libapache2-mod-php<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0432 \/var\/www\/html\/stat\/<\/p>\n<p><code>wget https:\/\/github.com\/CrashX\/SqStat\/archive\/refs\/heads\/main.zip<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b<\/p>\n<p><code>touch \/etc\/apache2\/conf-available\/sqstat.conf  <\/code><\/p>\n<p><code>nano \/etc\/apache2\/conf-available\/sqstat.conf<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u043e\u0441\u0438\u043c \u043f\u0440\u0430\u0432\u043a\u0438. IP \u0430\u0434\u0440\u0435\u0441 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433. <\/p>\n<p><code>Alias \/sqstat\/ \/var\/www\/html\/sqstat\/<\/code><\/p>\n<p><code>&lt;Location \"\/sqstat\/\"><\/code><\/p>\n<p><code>\u00a0\u00a0 DirectoryIndex sqstat.php<\/code><\/p>\n<p><code>\u00a0\u00a0 order deny,allow<\/code><\/p>\n<p><code>\u00a0\u00a0 allow from 192.168.10.222\/32<\/code><\/p>\n<p><code>&lt;\/Location><\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c sqstat \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c apache2<\/p>\n<p><code>a2enconf sqstat  <\/code><\/p>\n<p><code>service apache2 reload<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412 squid.conf \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043b\u044e\u0431\u043e\u0439)<\/p>\n<p><code>cachemgr_passwd password all<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412 http_access \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c<\/p>\n<p><code>http_access allow manager localhost<\/code><\/p>\n<p><code>http_access allow localnet manager<\/code><\/p>\n<p><code>http_access deny manager<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c, \u0432\u044b\u0445\u043e\u0434\u0438\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u00a0\/var\/www\/html\/sqstat\/config.inc.php<\/p>\n<pre><code class=\"php\">&lt;?php     \/* global settings *\/     $use_js=true; \/\/ use javascript for the HTML toolkits     DEFINE(\"SQSTAT_SHOWLEN\",60);     \/* proxy settings *\/     $squidhost[0]=\"127.0.0.1\";     $squidport[0]=3128;     $cachemgr_passwd[0]=\"password\";     $resolveip[0]=false;     $group_by[0]=\"username\"; ?><\/code><\/pre>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c<\/p>\n<p><code>squid -k reconfigure<\/code><\/p>\n<p><code>\/etc\/init.d\/apache2 reload<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0434\u0435\u0442\u0435 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, DNS \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<p><a href=\"https:\/\/proxy_comp.yourdomain.com\/sqtat\" rel=\"noopener noreferrer nofollow\">proxy_comp.yourdomain.com\/sqtat<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/350\/355\/b72\/350355b72c8ecfd75f7a7d6e0ed06799.PNG\" width=\"1897\" height=\"164\"\/><\/figure>\n<hr\/>\n<p>\u041a \u0441\u0430\u043c\u043e\u043c\u0443 \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443, <strong>\u043a\u043e\u043d\u0444\u0438\u0433.<\/strong><\/p>\n<p>\u0415\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c:<br \/><a href=\"http:\/\/yourdomain.com\" rel=\"noopener noreferrer nofollow\">yourdomain.com<\/a> \u2013 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<br \/>proxy_comp &#8212; \u0438\u043c\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 DNS<br \/>192.168.10.100 \u2013 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u043a\u0441\u0438<br \/>192.168.10.222 &#8212; IP \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0430<\/p>\n<pre><code>################################################# # \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f Kerberos #################################################  auth_param negotiate program \/usr\/lib\/squid\/negotiate_kerberos_auth -k \/etc\/squid\/squid.keytab -s user-px@YOURDOMAIN.COM auth_param negotiate children 160 startup=0 idle=1 auth_param negotiate keep_alive off  ################################################# # \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 #################################################  http_port 192.168.10.100:3128 http_port 127.0.0.1:3128  ################################################# # \u041f\u043e\u0434\u0441\u0435\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 #################################################  acl localnet src 192.168.10.0\/24   ################################################# # \u0417\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 AD #################################################  external_acl_type class_maximum %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g maximum@YOURDOMAIN.COM -D YOURDOMAIN.COM external_acl_type class_medium %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g medium@YOURDOMAIN.COM -D YOURDOMAIN.COM external_acl_type class_minimum %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g minimum@YOURDOMAIN.COM -D YOURDOMAIN.COM  ################################################# # Alias #################################################  acl acl_maximum external class_maximum acl acl_medium external class_medium acl acl_minimum external class_minimum  ################################################# # Transactions for delay_pools #################################################  acl mark_maximum annotate_transaction maximum=true acl mark_medium annotate_transaction medium=true acl mark_minumum annotate_transaction minumum=true  ################################################# # ACL Note #################################################  acl speed_limit_maximum note maximum true acl speed_limit_medium note medium true acl speed_limit_minimum note minimum true  ################################################# # \u0414\u043e\u0441\u0442\u0443\u043f\u044b \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c #################################################  external_acl_type allow_social_net %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g social_net@YOURDOMAIN.COM -D YOURDOMAIN.COM external_acl_type allow_shops %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g shops@YOURDOMAIN.COM -D YOURDOMAIN.COM  ################################################# # Alias #################################################  acl social_net external allow_social_net          # LDAP Group External Access acl shops external allow_shops                    # LDAP Group External Access  ################################################# # \u0421\u043f\u0438\u0441\u043a\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 #################################################  acl white_social_net url_regex -i \"\/etc\/squid\/lists\/soc.net.list\" # \u0414\u043b\u044f \u0441\u043e\u0446.\u0441\u0435\u0442\u0435\u0439 acl white_shops url_regex -i \"\/etc\/squid\/lists\/shops.list\"        # \u0414\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u043e\u0432  ################################################# # \u0427\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 #################################################  acl black_deny url_regex -i \"\/etc\/squid\/lists\/lock_sites\"         # \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0438\u0440\u0443\u0441\u043d\u044b\u0445 \u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 acl domain_deny dstdomain \"\/etc\/squid\/lists\/lock_domain\"          # \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432  ################################################# # \u041f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u0431\u0430\u043d\u043a\u043e\u0432 #################################################  acl port_allowed port 80# Port HTTP acl port_allowed port 443# Port HTTPS acl port_allowed port 9443# Port Sberbank biz  ################################################# # \u0421\u0430\u0439\u0442\u044b \u0438 \u0434\u043e\u043c\u0435\u043d\u044b #################################################  acl dst_sber dst 92.38.2.0\/24 acl dst_direct dstdomain .sbis.ru  ################################################# # Ammyy Admin #################################################  acl dst_ammyynet dstdomain .ammyy.com acl dst_ammyynet_ip dst 23.111.200.0\/24  ################################################# # IP \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 #################################################  acl admin src 192.168.10.222\/32  ################################################# # Delay_pools  1 Mb = 125000 bytes #################################################  delay_pools 3                                                   # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u043b\u043e\u0432  delay_class 1 4  delay_parameters 1 none none none 1875000\/1875000               # 15 Mbit\/s  delay_access 1 allow speed_maximum  delay_access 1 deny all   delay_class 2 4  delay_parameters 2 none none none 1000000\/1000000               # 8 Mbit\/s  delay_access 2 allow speed_medium  delay_access 2 deny all   delay_class 3 4  delay_parameters 3 none none none 500000\/500000                 # 4 Mbit\/s  delay_access 3 allow speed_minimum  delay_access 3 deny all  ################################################# # \u0414\u043e\u0441\u0442\u0443\u043f\u044b #################################################  http_access allow localhost        # \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432\u0441\u0435\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 http_access allow admin            # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430\u0448\u0435\u043c\u0443 IP \u0432 \u043e\u0431\u0445\u043e\u0434 \u0432\u0441\u0435\u0445 \u043f\u0440\u0430\u0432\u0438\u043b  http_access allow manager localhost http_access allow localnet manager http_access deny manager  http_access deny !port_allowed     # \u0414\u043b\u044f \u043f\u043e\u0440\u0442\u043e\u0432  http_access allow dst_direct       # \u0414\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441\u0431\u0438\u0441\u0430 http_access allow dst_sber         # \u0414\u043b\u044f \u0441\u0431\u0435\u0440\u0430  http_access allow dst_ammyynet     # \u0414\u043b\u044f ammyy admin http_access allow dst_ammyynet_ip  # \u0414\u043b\u044f ammyy admin   http_access deny !social_net white_social_net  http_access deny !shops white_shops  ################################################# # \u0411\u043b\u043e\u043a \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043a \u0447\u0435\u0440\u043d\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 #################################################  http_access deny black_deny http_access deny domain_deny  ################################################# # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u0438 #################################################  http_access allow acl_maximum mark_maximum   # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 http_access allow acl_medium mark_medium     # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 http_access allow acl_minimum mark_minimum   # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439  # \u041a\u0442\u043e \u043d\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0433\u0440\u0443\u043f\u043f, \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430\u043c.  http_access deny all  ################################################# # Cache (\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u044d\u0448\u0430) #################################################  cache_mem 1024 MB  maximum_object_size_in_memory 10024 KB  cache_dir ufs \/var\/spool\/squid 2048 16 256  maximum_object_size 4 MB  access_log daemon:\/var\/log\/squid\/access.log squid  logfile_rotate 31  ################################################# # SqStat #################################################  cachemgr_passwd password all<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Squid \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c welcome \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p>\n<\/div>\n<\/details>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/719896\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 1<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/719902\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/720160\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 3<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/733016\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445 \u043c\u043d\u043e\u0433\u043e \u0441\u043f\u043e\u0440\u043e\u0432. \u0412\u043e\u043f\u0440\u043e\u0441: \u0423\u0441\u0442\u0430\u0440\u0435\u043b \u043b\u0438 Squid?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">66.67% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442, \u0435\u0449\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d<\/span><span class=\"tm-article-poll__answer-votes\">42<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 66.67%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">33.33% <\/span><span class=\"tm-article-poll__answer-label\">\u0414\u0430, \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0432\u0435\u043a<\/span><span class=\"tm-article-poll__answer-votes\">21<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 33.33%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 63 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 8 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/733016\/\"> https:\/\/habr.com\/ru\/articles\/733016\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u0430\u043d\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 + \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 SqStat + \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/h2>\n<p>\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u043a\u043e\u043b\u043b\u0435\u0433\u0438. \u041f\u043e \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c \u0442\u0440\u0443\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0443\u0447\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443.<\/p>\n<h3>\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u0430\u043d\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0430\u043d\u043a\u0438 \u043d\u0435 \u0434\u0430\u044e\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u043e\u0440\u0442\u044b \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Ammyy Admin) \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0434 \u0444\u0438\u043b\u044c\u0442\u0440 \u0438 \u043a\u043e\u043d\u043d\u0435\u043a\u0442 \u0441 \u0438\u0445 ip \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 squid.conf \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u00ab#\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0430\u0439\u0442\u043e\u0432\u00bb \u0438 \u00ab#IP \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u00bb \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<p><u>\u0414\u043b\u044f \u043f\u043e\u0440\u0442\u043e\u0432 \u0431\u0430\u043d\u043a-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432<\/u><\/p>\n<p><code>acl port_allowed port 80\u00a0\u00a0\u00a0\u00a0# Port HTTP<\/code><\/p>\n<p><code>acl port_allowed port 443\u00a0\u00a0\u00a0# Port HTTPS<\/code><\/p>\n<p><code>acl port_allowed port 9443\u00a0\u00a0# Port Sberbank biz<\/code><\/p>\n<p><em>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0438.<\/em><\/p>\n<p><u>\u0414\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0431\u0430\u043d\u043a\u043e\u0432<\/u><\/p>\n<p><code>acl dst_sber dst 92.38.2.0\/24<\/code><\/p>\n<p><code>acl dst_direct dstdomain .sbis.ru<\/code><\/p>\n<p><u>\u0414\u043b\u044f Ammyy Admin<\/u><\/p>\n<p><code>acl dst_ammyynet dstdomain .ammyy.com<\/code><\/p>\n<p><code>acl dst_ammyynet_ip dst 23.111.200.0\/24<\/code><\/p>\n<p><u>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b <\/u><strong><u>http_access<\/u><\/strong><u> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438:<\/u><\/p>\n<p><code>http_access deny !port_allowed       # \u0414\u043b\u044f \u043f\u043e\u0440\u0442\u043e\u0432<\/code><\/p>\n<p><code>http_access allow dst_direct         # \u0414\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441\u0431\u0438\u0441\u0430<\/code><\/p>\n<p><code>http_access allow dst_sber           # \u0414\u043b\u044f \u0441\u0431\u0435\u0440\u0430<\/code><\/p>\n<p><code>http_access allow dst_ammyynet       # \u0414\u043b\u044f ammyy admin<\/code><\/p>\n<p><code>http_access allow dst_ammyynet_ip    # \u0414\u043b\u044f ammyy admin<\/code><\/p>\n<hr\/>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 SqStat<\/h2>\n<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 Squid, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0435\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0438 \u0442.\u043f. \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: ScreenSquid.<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Apache2 \u0438 php<\/p>\n<p><code>sudo apt install -y apache2 libapache2-mod-php<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0432 \/var\/www\/html\/stat\/<\/p>\n<p><code>wget https:\/\/github.com\/CrashX\/SqStat\/archive\/refs\/heads\/main.zip<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b<\/p>\n<p><code>touch \/etc\/apache2\/conf-available\/sqstat.conf  <\/code><\/p>\n<p><code>nano \/etc\/apache2\/conf-available\/sqstat.conf<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u043e\u0441\u0438\u043c \u043f\u0440\u0430\u0432\u043a\u0438. IP \u0430\u0434\u0440\u0435\u0441 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433. <\/p>\n<p><code>Alias \/sqstat\/ \/var\/www\/html\/sqstat\/<\/code><\/p>\n<p><code>&lt;Location \"\/sqstat\/\"><\/code><\/p>\n<p><code>\u00a0\u00a0 DirectoryIndex sqstat.php<\/code><\/p>\n<p><code>\u00a0\u00a0 order deny,allow<\/code><\/p>\n<p><code>\u00a0\u00a0 allow from 192.168.10.222\/32<\/code><\/p>\n<p><code>&lt;\/Location><\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c sqstat \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c apache2<\/p>\n<p><code>a2enconf sqstat  <\/code><\/p>\n<p><code>service apache2 reload<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412 squid.conf \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043b\u044e\u0431\u043e\u0439)<\/p>\n<p><code>cachemgr_passwd password all<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412 http_access \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c<\/p>\n<p><code>http_access allow manager localhost<\/code><\/p>\n<p><code>http_access allow localnet manager<\/code><\/p>\n<p><code>http_access deny manager<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c, \u0432\u044b\u0445\u043e\u0434\u0438\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u00a0\/var\/www\/html\/sqstat\/config.inc.php<\/p>\n<pre><code class=\"php\">&lt;?php     \/* global settings *\/     $use_js=true; \/\/ use javascript for the HTML toolkits     DEFINE(\"SQSTAT_SHOWLEN\",60);     \/* proxy settings *\/     $squidhost[0]=\"127.0.0.1\";     $squidport[0]=3128;     $cachemgr_passwd[0]=\"password\";     $resolveip[0]=false;     $group_by[0]=\"username\"; ?><\/code><\/pre>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c<\/p>\n<p><code>squid -k reconfigure<\/code><\/p>\n<p><code>\/etc\/init.d\/apache2 reload<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0434\u0435\u0442\u0435 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, DNS \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<p><a href=\"https:\/\/proxy_comp.yourdomain.com\/sqtat\" rel=\"noopener noreferrer nofollow\">proxy_comp.yourdomain.com\/sqtat<\/a><\/p>\n<figure class=\"full-width\"><\/figure>\n<hr\/>\n<p>\u041a \u0441\u0430\u043c\u043e\u043c\u0443 \u0433\u043b\u0430\u0432\u043d\u043e\u043c\u0443, <strong>\u043a\u043e\u043d\u0444\u0438\u0433.<\/strong><\/p>\n<p>\u0415\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c:<br \/><a href=\"http:\/\/yourdomain.com\" rel=\"noopener noreferrer nofollow\">yourdomain.com<\/a> \u2013 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<br \/>proxy_comp &#8212; \u0438\u043c\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 DNS<br \/>192.168.10.100 \u2013 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u043a\u0441\u0438<br \/>192.168.10.222 &#8212; IP \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0430<\/p>\n<pre><code>################################################# # \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f Kerberos #################################################  auth_param negotiate program \/usr\/lib\/squid\/negotiate_kerberos_auth -k \/etc\/squid\/squid.keytab -s user-px@YOURDOMAIN.COM auth_param negotiate children 160 startup=0 idle=1 auth_param negotiate keep_alive off  ################################################# # \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 #################################################  http_port 192.168.10.100:3128 http_port 127.0.0.1:3128  ################################################# # \u041f\u043e\u0434\u0441\u0435\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 #################################################  acl localnet src 192.168.10.0\/24   ################################################# # \u0417\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 AD #################################################  external_acl_type class_maximum %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g maximum@YOURDOMAIN.COM -D YOURDOMAIN.COM external_acl_type class_medium %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g medium@YOURDOMAIN.COM -D YOURDOMAIN.COM external_acl_type class_minimum %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g minimum@YOURDOMAIN.COM -D YOURDOMAIN.COM  ################################################# # Alias #################################################  acl acl_maximum external class_maximum acl acl_medium external class_medium acl acl_minimum external class_minimum  ################################################# # Transactions for delay_pools #################################################  acl mark_maximum annotate_transaction maximum=true acl mark_medium annotate_transaction medium=true acl mark_minumum annotate_transaction minumum=true  ################################################# # ACL Note #################################################  acl speed_limit_maximum note maximum true acl speed_limit_medium note medium true acl speed_limit_minimum note minimum true  ################################################# # \u0414\u043e\u0441\u0442\u0443\u043f\u044b \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c #################################################  external_acl_type allow_social_net %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g social_net@YOURDOMAIN.COM -D YOURDOMAIN.COM external_acl_type allow_shops %LOGIN \/usr\/lib\/squid\/ext_kerberos_ldap_group_acl -a -g shops@YOURDOMAIN.COM -D YOURDOMAIN.COM  ################################################# # Alias #################################################  acl social_net external allow_social_net          # LDAP Group External Access acl shops external allow_shops                    # LDAP Group External Access  ################################################# # \u0421\u043f\u0438\u0441\u043a\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 #################################################  acl white_social_net url_regex -i \"\/etc\/squid\/lists\/soc.net.list\" # \u0414\u043b\u044f \u0441\u043e\u0446.\u0441\u0435\u0442\u0435\u0439 acl white_shops url_regex -i \"\/etc\/squid\/lists\/shops.list\"        # \u0414\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u043e\u0432  ################################################# # \u0427\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 #################################################  acl black_deny url_regex -i \"\/etc\/squid\/lists\/lock_sites\"         # \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0438\u0440\u0443\u0441\u043d\u044b\u0445 \u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 acl domain_deny dstdomain \"\/etc\/squid\/lists\/lock_domain\"          # \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432  ################################################# # \u041f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u0431\u0430\u043d\u043a\u043e\u0432 #################################################  acl port_allowed port 80# Port HTTP acl port_allowed port 443# Port HTTPS acl port_allowed port 9443# Port Sberbank biz  ################################################# # \u0421\u0430\u0439\u0442\u044b \u0438 \u0434\u043e\u043c\u0435\u043d\u044b #################################################  acl dst_sber dst 92.38.2.0\/24 acl dst_direct dstdomain .sbis.ru  ################################################# # Ammyy Admin #################################################  acl dst_ammyynet dstdomain .ammyy.com acl dst_ammyynet_ip dst 23.111.200.0\/24  ################################################# # IP \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 #################################################  acl admin src 192.168.10.222\/32  ################################################# # Delay_pools  1 Mb = 125000 bytes #################################################  delay_pools 3                                                   # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u043b\u043e\u0432  delay_class 1 4  delay_parameters 1 none none none 1875000\/1875000               # 15 Mbit\/s  delay_access 1 allow speed_maximum  delay_access 1 deny all   delay_class 2 4  delay_parameters 2 none none none 1000000\/1000000               # 8 Mbit\/s  delay_access 2 allow speed_medium  delay_access 2 deny all   delay_class 3 4  delay_parameters 3 none none none 500000\/500000                 # 4 Mbit\/s  delay_access 3 allow speed_minimum  delay_access 3 deny all  ################################################# # \u0414\u043e\u0441\u0442\u0443\u043f\u044b #################################################  http_access allow localhost        # \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432\u0441\u0435\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 http_access allow admin            # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430\u0448\u0435\u043c\u0443 IP \u0432 \u043e\u0431\u0445\u043e\u0434 \u0432\u0441\u0435\u0445 \u043f\u0440\u0430\u0432\u0438\u043b  http_access allow manager localhost http_access allow localnet manager http_access deny manager  http_access deny !port_allowed     # \u0414\u043b\u044f \u043f\u043e\u0440\u0442\u043e\u0432  http_access allow dst_direct       # \u0414\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441\u0431\u0438\u0441\u0430 http_access allow dst_sber         # \u0414\u043b\u044f \u0441\u0431\u0435\u0440\u0430  http_access allow dst_ammyynet     # \u0414\u043b\u044f ammyy admin http_access allow dst_ammyynet_ip  # \u0414\u043b\u044f ammyy admin   http_access deny !social_net white_social_net  http_access deny !shops white_shops  ################################################# # \u0411\u043b\u043e\u043a \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043a \u0447\u0435\u0440\u043d\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 #################################################  http_access deny black_deny http_access deny domain_deny  ################################################# # \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u0438 #################################################  http_access allow acl_maximum mark_maximum   # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 http_access allow acl_medium mark_medium     # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 http_access allow acl_minimum mark_minimum   # \u0414\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439  # \u041a\u0442\u043e \u043d\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0433\u0440\u0443\u043f\u043f, \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430\u043c.  http_access deny all  ################################################# # Cache (\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u044d\u0448\u0430) #################################################  cache_mem 1024 MB  maximum_object_size_in_memory 10024 KB  cache_dir ufs \/var\/spool\/squid 2048 16 256  maximum_object_size 4 MB  access_log daemon:\/var\/log\/squid\/access.log squid  logfile_rotate 31  ################################################# # SqStat #################################################  cachemgr_passwd password all<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Squid \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u043b \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c welcome \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p>\n<\/div>\n<\/details>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/719896\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 1<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/719902\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/720160\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 3<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/733016\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-408590","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=408590"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408590\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}