(proxy) Add remoteblacklist to squid configuration

This commit is contained in:
Jos Schellevis 2015-07-02 09:58:21 +02:00
parent 21ba10e29d
commit 1836bc5a2d

View File

@ -105,7 +105,7 @@ acl whiteList url_regex {{element|replace(".","\.")}}
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %}
# ALC - Blacklist - User defined (blackList)
# ACL - Blacklist - User defined (blackList)
{% for element in OPNsense.proxy.forward.acl.blackList.split(",") %}
{% if '^' in element or '\\' in element or '$' in element or '[' in element %}
acl blackList url_regex {{element}}
@ -114,9 +114,18 @@ acl blackList url_regex {{element|replace(".","\.")}}
{% endif %}
{% endfor %}
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
# ACL - Remote fetched Blacklist (remoteblacklist)
{% if helpers.exists('OPNsense.proxy.forward.acl.remoteACLs.blacklists') %}
{% for blacklist in helpers.toList('OPNsense.proxy.forward.acl.remoteACLs.blacklists.blacklist') %}
{% if blacklist.enabled=='1' %}
acl remoteblacklist dstdom_regex "/usr/local/etc/squid/acl/{{blacklist.filename}}"
{% endif %}
{% endfor %}
{% endif %}
# ALC - Block browser/user-agent - User defined (browser)
{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
{% for element in OPNsense.proxy.forward.acl.browser.split(",") %}
acl blockuseragents browser {{element}}
{% endfor %}
@ -182,6 +191,10 @@ http_access allow whiteList
#
# ACL list (Deny) blacklist
http_access deny blackList
# ACL list (Deny) remoteblacklist
http_access deny remoteblacklist
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}