# limitations under the License.
#
-if node[:squid][:version] == "3"
+if node[:squid][:version] >= 3
apt_package "squid" do
action :unlock
end
mode "0755"
end
+address_families = %w[AF_UNIX AF_INET]
+
+address_families << "AF_INET6" unless node.interfaces(:family => :inet6).empty?
+
systemd_service "squid" do
description "Squid caching proxy"
after ["network.target", "nss-lookup.target"]
private_devices true
protect_system "full"
protect_home true
+ restrict_address_families address_families
restart "on-failure"
timeout_sec 0
end