{"id":346149,"date":"2023-03-02T09:02:54","date_gmt":"2023-03-02T09:02:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346149"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346149","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.2<\/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<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Squid<\/h4>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \/etc\/squid\/squid.conf<\/p>\n<p><code># \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f Kerberos<\/code><\/p>\n<p><code>auth_param negotiate program \/usr\/lib\/squid\/negotiate_kerberos_auth -k \/etc\/squid\/squid.keytab -s proxy_k@YOURDOMAIN.RU<\/code><\/p>\n<p><code>auth_param negotiate children 160 startup=0 idle=1<\/code><\/p>\n<p><code>auth_param negotiate keep_alive off<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/code><\/p>\n<p><code>http_port 192.168.10.100:3128<\/code><\/p>\n<p><code>http_port 127.0.0.1:3128<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># \u0412 ACL \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <\/code><\/p>\n<p><code>acl auth proxy_auth REQUIRED        # \u0414\u043e\u0441\u0442\u0443\u043f \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/code><\/p>\n<p><code>acl localnet src 192.168.10.1\/24    # \u041f\u043e\u0434\u0441\u0435\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># HTTP Access (\u0414\u043e\u0441\u0442\u0443\u043f \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e)<\/code><\/p>\n<p><code>http_access allow auth<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># Cache (\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u044d\u0448\u0430)<\/code><\/p>\n<p><code>cache_mem 1024 MB<\/code><\/p>\n<p><code>maximum_object_size_in_memory 512 KB<\/code><\/p>\n<p><code>cache_dir ufs \/var\/spool\/squid 2048 16 256<\/code><\/p>\n<p><code>maximum_object_size 4 MB<\/code><\/p>\n<p><code>access_log daemon:\/var\/log\/squid\/access.log squid<\/code><\/p>\n<p><code>logfile_rotate 31<\/code><\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043c \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044f\u043c \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0438. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b squid.conf. <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>squid -k reconfigurate<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/708\/8ad\/d65\/7088add65babd941a611a211d113d8dc.PNG\" width=\"811\" height=\"766\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438\u0437 \u0441\u0435\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><a href=\"mailto:HTTP\/proxy_comp@yourdomain.com\" rel=\"noopener noreferrer nofollow\">HTTP\/proxy_comp@yourdomain.com<\/a><\/p>\n<p>\u041f\u043e\u0440\u0442: 3128<\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0430 \u0432\u0438\u043d\u0434\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u043a \u0441\u0430\u0439\u0442\u0430\u043c.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \/var\/log\/squid\/cache.log <\/p>\n<p>\u0418 \u043b\u043e\u0433\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u0432 \u043a \u0441\u0430\u0439\u0442\u0430\u043c \u0432 \/var\/log\/squid\/access.log<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/post\/719902\/\"> https:\/\/habr.com\/ru\/post\/719902\/<\/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<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Squid<\/h4>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \/etc\/squid\/squid.conf<\/p>\n<p><code># \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f Kerberos<\/code><\/p>\n<p><code>auth_param negotiate program \/usr\/lib\/squid\/negotiate_kerberos_auth -k \/etc\/squid\/squid.keytab -s proxy_k@YOURDOMAIN.RU<\/code><\/p>\n<p><code>auth_param negotiate children 160 startup=0 idle=1<\/code><\/p>\n<p><code>auth_param negotiate keep_alive off<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/code><\/p>\n<p><code>http_port 192.168.10.100:3128<\/code><\/p>\n<p><code>http_port 127.0.0.1:3128<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># \u0412 ACL \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <\/code><\/p>\n<p><code>acl auth proxy_auth REQUIRED        # \u0414\u043e\u0441\u0442\u0443\u043f \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/code><\/p>\n<p><code>acl localnet src 192.168.10.1\/24    # \u041f\u043e\u0434\u0441\u0435\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># HTTP Access (\u0414\u043e\u0441\u0442\u0443\u043f \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e)<\/code><\/p>\n<p><code>http_access allow auth<\/code><\/p>\n<p>\u00a0<\/p>\n<p><code># Cache (\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u044d\u0448\u0430)<\/code><\/p>\n<p><code>cache_mem 1024 MB<\/code><\/p>\n<p><code>maximum_object_size_in_memory 512 KB<\/code><\/p>\n<p><code>cache_dir ufs \/var\/spool\/squid 2048 16 256<\/code><\/p>\n<p><code>maximum_object_size 4 MB<\/code><\/p>\n<p><code>access_log daemon:\/var\/log\/squid\/access.log squid<\/code><\/p>\n<p><code>logfile_rotate 31<\/code><\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043c \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044f\u043c \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0438. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b squid.conf. <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>squid -k reconfigurate<\/code>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438\u0437 \u0441\u0435\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p><a href=\"mailto:HTTP\/proxy_comp@yourdomain.com\" rel=\"noopener noreferrer nofollow\">HTTP\/proxy_comp@yourdomain.com<\/a><\/p>\n<p>\u041f\u043e\u0440\u0442: 3128<\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0430 \u0432\u0438\u043d\u0434\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u043a \u0441\u0430\u0439\u0442\u0430\u043c.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \/var\/log\/squid\/cache.log <\/p>\n<p>\u0418 \u043b\u043e\u0433\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u0432 \u043a \u0441\u0430\u0439\u0442\u0430\u043c \u0432 \/var\/log\/squid\/access.log<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/post\/719902\/\"> https:\/\/habr.com\/ru\/post\/719902\/<\/a><br \/><\/br><\/br><\/p>\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-346149","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346149","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=346149"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346149\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}