Proxy work in progress, change mathinh on white and blacklists

This commit is contained in:
Jos Schellevis 2015-04-24 11:16:53 +02:00
parent 7773bb31cd
commit 88c07be2ae

View File

@ -77,7 +77,7 @@ acl bannedHosts src {{ip}}
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ALC - Whitelist - User defined (whiteList)
{% for element in OPNsense.proxy.forward.acl.whiteList.split(",") %}
{% if '^' or '\\' or '$' or '[' in element %}
{% if ('^' or '\\' or '$' or '[') in element %}
acl whiteList url_regex {{element}}
{% else %}
acl dstdomain {{element}}
@ -88,7 +88,7 @@ acl dstdomain {{element}}
# ALC - Blacklist - User defined (blackList)
{% for element in OPNsense.proxy.forward.acl.blackList.split(",") %}
{% if '^' or '\\' or '$' or '[' in element %}
{% if ('^' or '\\' or '$' or '[') in element %}
acl url_regex {{element}}
{% else %}
acl blackList dstdomain {{element}}
@ -150,6 +150,13 @@ acl local_auth proxy_auth REQUIRED
# ACL list (Allow) unrestricted
http_access allow unrestricted
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ACL list (Allow) whitelist
http_access allow whiteList
{% endif %}
{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %}
#
@ -187,12 +194,6 @@ http_access deny manager
# one who can access services on "localhost" is a local user
http_access deny to_localhost
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
# ACL list (Allow) whitelist
http_access allow whiteList
{% endif %}
#
# Access Permission configuration:
#