mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
www/squid: select behavior for banned hosts (#4710)
This commit is contained in:
@@ -421,6 +421,12 @@
|
||||
<help>Type IP addresses you want to deny access to the proxy server.</help>
|
||||
<allownew>true</allownew>
|
||||
</field>
|
||||
<field>
|
||||
<id>proxy.forward.acl.allowWhitelistBannedHosts</id>
|
||||
<label>Whitelist access for banned hosts</label>
|
||||
<type>checkbox</type>
|
||||
<help>Allows banned hosts to access domains listed in whitelist.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>proxy.forward.acl.whiteList</id>
|
||||
<label>Whitelist</label>
|
||||
|
||||
@@ -355,6 +355,10 @@
|
||||
<bannedHosts type="CSVListField">
|
||||
<Mask>/^([\/0-9a-fA-F.:,])*/u</Mask>
|
||||
</bannedHosts>
|
||||
<allowWhitelistBannedHosts type="BooleanField">
|
||||
<Default>1</Default>
|
||||
<Required>Y</Required>
|
||||
</allowWhitelistBannedHosts>
|
||||
<whiteList type="CSVListField"/>
|
||||
<blackList type="CSVListField"/>
|
||||
<browser type="CSVListField"/>
|
||||
|
||||
@@ -14,6 +14,20 @@ adaptation_access request_mod allow unrestricted
|
||||
http_access allow unrestricted
|
||||
{% endif %}
|
||||
|
||||
{% if helpers.exists('OPNsense.proxy.forward.acl.bannedHosts') and OPNsense.proxy.forward.acl.allowWhitelistBannedHosts|default('1') == '0' %}
|
||||
|
||||
# ACL list (Deny) banned hosts
|
||||
{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
|
||||
{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
|
||||
adaptation_access response_mod deny bannedHosts
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
|
||||
adaptation_access request_mod deny bannedHosts
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
http_access deny bannedHosts
|
||||
{% endif %}
|
||||
|
||||
{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
|
||||
|
||||
# ACL list (Allow) whitelist
|
||||
@@ -139,7 +153,9 @@ adaptation_access request_mod deny CONNECT !SSL_ports {% if helpers.exists('OPNs
|
||||
|
||||
http_access deny CONNECT !SSL_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
|
||||
|
||||
{% if helpers.exists('OPNsense.proxy.forward.acl.bannedHosts') %}
|
||||
{% if helpers.exists('OPNsense.proxy.forward.acl.bannedHosts') and OPNsense.proxy.forward.acl.allowWhitelistBannedHosts|default('1') == '1' %}
|
||||
|
||||
# ACL list (Deny) banned hosts
|
||||
{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
|
||||
{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
|
||||
adaptation_access response_mod deny bannedHosts
|
||||
|
||||
Reference in New Issue
Block a user