# TAG: auth_param
##NTLM-autentification
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 1500
auth_param basic credentialsttl 1 hours
auth_param ntlm keep_alive on
##
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 150
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
# ACCESS CONTROLS
# -----------------------------------------------------------------------------
# TAG: acl
acl Sams2Time1 time MTWHFAS 00:00-23:59
#Доменная аутентификация для пользователей домена
acl Sams2Template1 proxy_auth $login # Кому можно
acl Sams2BlockedUsers proxy_auth $login # И кому нельзя
# Список сайтов, на которые ходить без аутентификации
acl no_auth url_regex -i "/etc/squid/no-auth.txt"
# Для доступа к Skype
acl skype dstdomain apps.skypeassets.com mscrl.microsoft.com
# Локальная сеть
acl localnet src 10.0.0.0/8
#-----------ICQ----------------
acl icq dstdomain login.icq.com
acl icqport port 443
acl icqport port 5190
acl icqip dst 178.237.16.0/20
#------------------------------
#---------SSL и Безопасные порты---------------------------
acl SSL_ports port 443 5190
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 no_auth
# TAG: http_access
# Setup Sams2 HTTP Access here
http_access deny Sams2BlockedUsers
http_access allow Sams2Template1 Sams2Time1
http_access allow skype
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access allow localhost
http_access deny manager
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow localnet
# Запрещаем все неразрешенное
http_access deny all
# -----------------------------------------------------------------------------
# TAG: http_port
http_port 9999 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=/etc/squid/ssl/squid_CA.pem key=/etc/squid/ssl/squid_CA.key cipher=ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:DHE-RSA-CAMELLIA128-SHA:AES128-SHA:RC4-SHA:HIGH:!aNULL:!MD5:!ADH
# SSL OPTIONS
# TAG: ssl_bump
# HTTPS без подмены
acl blocked ssl::server_name "/etc/squid/blocked_https.txt" # Для блокировки сайтов
acl step1 at_step SslBump1
#---- Для работы ICQ----------------
ssl_bump splice step1 icq
ssl_bump splice step1 icqip icqport
#-----------------------------------
ssl_bump peek step1
ssl_bump splice all
#-----------Telegram-----------------------------------------------------
# SSL-bump rules
acl DiscoverSNIHost at_step SslBump1
# Splice specified servers
acl NoSSLIntercept ssl::server_name_regex "/etc/squid/acl.url.nobump"
ssl_bump peek DiscoverSNIHost
ssl_bump splice NoSSLIntercept
------------------------------------------------------------------------
# TAG: sslproxy_flags
sslproxy_flags DONT_VERIFY_PEER
# TAG: sslproxy_cert_error
sslproxy_cert_error allow all
# LOGFILE OPTIONS
# -----------------------------------------------------------------------------
# TAG: logformat
logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt
# TAG: access_log
access_log /var/log/squid/access.log squid
# OPTIONS FOR URL REWRITING
# -----------------------------------------------------------------------------
# TAG: url_rewrite_access
acl Sams2Proxy dst $ProxyIP
url_rewrite_access deny Sams2Proxy
# OPTIONS FOR TUNING THE CACHE
# -----------------------------------------------------------------------------
# TAG: refresh_pattern
# Add any of your own refresh_pattern entries above these.
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
# TAG: error_log_languages
#Default:
error_log_languages off
deny_info 303:http://url.domain.local/index.html?login=%a&url=%U Sams2BlockedUsers
# TAG: deny_info