squid.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # Recommended minimum configuration:
  3. #
  4. acl SSL_ports port 443
  5. acl Safe_ports port 80 # http
  6. acl Safe_ports port 443 # https
  7. acl CONNECT method CONNECT
  8. acl 1984tech url_regex "squid/1984tech.conf"
  9. http_access deny 1984tech
  10. deny_info ERR_1984TECH 1984tech
  11. #
  12. # Recommended minimum Access Permission configuration:
  13. #
  14. # Deny requests to certain unsafe ports
  15. http_access deny !Safe_ports
  16. # Deny CONNECT to other than secure SSL ports
  17. http_access deny CONNECT !SSL_ports
  18. # Only allow cachemgr access from localhost
  19. http_access allow localhost manager
  20. http_access allow ALL
  21. http_access deny manager
  22. http_access deny to_localhost
  23. # Squid normally listens to port 3128
  24. http_port 127.0.0.1:3128 intercept options=NO_SSLv3:NO_SSLv2
  25. # указываем HTTPS порт с нужными опциями
  26. https_port 127.0.0.1:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=squid/squidCA.pem
  27. always_direct allow all
  28. sslproxy_cert_error allow all
  29. sslproxy_flags DONT_VERIFY_PEER
  30. #укажем правило со списком блокируемых ресурсов (в файле домены вида .domain.com)
  31. acl blocked ssl::server_name_regex "squid/1984tech.conf"
  32. acl step1 at_step SslBump1
  33. ssl_bump peek step1
  34. #терминируем соединение, если клиент заходит на запрещенный ресурс
  35. ssl_bump terminate blocked
  36. ssl_bump splice all
  37. # Leave coredumps in the first cache dir
  38. coredump_dir /var/squid/cache