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
http_port 80 accel defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6 http11
<% else -%>
http_port 80 accel no-vhost defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6
-
-#prefer IPv4 until everything is upgraded
-dns_v4_first on
<% end -%>
cache_effective_user proxy
property :private_network, [TrueClass, FalseClass]
property :protect_system, [TrueClass, FalseClass, String]
property :protect_home, [TrueClass, FalseClass, String]
+property :restrict_address_families, [String, Array]
property :no_new_privileges, [TrueClass, FalseClass]
property :timeout_sec, Integer
property :pid_file, String
<% if @protect_home -%>
ProtectHome=<%= @protect_home %>
<% end -%>
+<% if @restrict_address_families -%>
+RestrictAddressFamilies=<%= Array(@restrict_address_families).join(" ") %>
+<% end -%>
<% if @no_new_privileges -%>
NoNewPrivileges=<%= @no_new_privileges %>
<% end -%>