mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-09 00:42:34 -04:00
www/c-icap: merge version 1.1 from master
This commit is contained in:
parent
611d5c30fb
commit
8664265e3e
8 changed files with 34 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= c-icap
|
||||
PLUGIN_VERSION= 1.0
|
||||
PLUGIN_VERSION= 1.1
|
||||
PLUGIN_COMMENT= c-icap connects your Proxy with a virus scanner
|
||||
PLUGIN_DEPENDS= c-icap c-icap-modules
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -77,4 +77,10 @@
|
|||
<type>text</type>
|
||||
<help>A name for this server. Used when displaying information about this server (logs, info service, etc).</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.enable_accesslog</id>
|
||||
<label>Enable access logging</label>
|
||||
<type>checkbox</type>
|
||||
<help>This will enable logging of access log.</help>
|
||||
</field>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -58,5 +58,9 @@
|
|||
<default></default>
|
||||
<Required>N</Required>
|
||||
</servername>
|
||||
</items>
|
||||
<enable_accesslog type="BooleanField">
|
||||
<default>1</default>
|
||||
<Required>Y</Required>
|
||||
</enable_accesslog>
|
||||
</items>
|
||||
</model>
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
ajaxCall(url="/api/cicap/service/status", sendData={}, callback=function(data,status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
|
||||
// check if ClamAV plugin is installed
|
||||
|
||||
// check if ClamAV plugin is installed
|
||||
ajaxCall(url="/api/cicap/service/checkclamav", sendData={}, callback=function(data,status) {
|
||||
if (data == "0") {
|
||||
$('#missing_clamav').show();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
c_icap:/etc/rc.conf.d/c_icap
|
||||
c-icap.conf:/usr/local/etc/c-icap/c-icap.conf
|
||||
newsyslog.conf:/etc/newsyslog.conf.d/c-icap
|
||||
virus_scan.conf:/usr/local/etc/c-icap/virus_scan.conf
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ RemoteProxyUsers off
|
|||
RemoteProxyUserHeader X-Authenticated-User
|
||||
RemoteProxyUserHeaderEncoded on
|
||||
ServerLog /var/log/c-icap/server.log
|
||||
{% if helpers.exists('OPNsense.cicap.general.enable_accesslog') and OPNsense.cicap.general.enable_accesslog == '1' %}
|
||||
AccessLog /var/log/c-icap/access.log
|
||||
{% endif %}
|
||||
Service echo srv_echo.so
|
||||
Include virus_scan.conf
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
|
||||
{% if helpers.exists('OPNsense.cicap.general.enabled') and OPNsense.cicap.general.enabled|default("0") == "1" %}
|
||||
{% if helpers.exists('OPNsense.cicap.general.enable_accesslog') and OPNsense.cicap.general.enable_accesslog == '1' %}
|
||||
/var/log/c-icap/access.log c_icap:c_icap 644 7 * @T00 ZB /var/run/c-icap/c-icap.pid
|
||||
{% endif %}
|
||||
/var/log/c-icap/server.log c_icap:c_icap 644 7 * @T00 ZB /var/run/c-icap/c-icap.pid
|
||||
{% endif %}
|
||||
|
|
@ -8,19 +8,23 @@ virus_scan.ScanFileTypes {{ OPNsense.cicap.antivirus.scanfiletypes.replace(',',
|
|||
{% endif %}
|
||||
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.sendpercentdata') and OPNsense.cicap.antivirus.sendpercentdata != '' %}
|
||||
virus_scan.SendPercentData 5
|
||||
virus_scan.SendPercentData {{ OPNsense.cicap.antivirus.sendpercentdata }}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.startsendpercentdataafter') and OPNsense.cicap.antivirus.startsendpercentdataafter != '' %}
|
||||
virus_scan.StartSendPercentDataAfter 2M
|
||||
virus_scan.StartSendPercentDataAfter {{ OPNsense.cicap.antivirus.startsendpercentdataafter }}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.allow204responses') and OPNsense.cicap.antivirus.allow204responses != '' %}
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.allow204responses') and OPNsense.cicap.antivirus.allow204responses == '1' %}
|
||||
virus_scan.Allow204Responces on
|
||||
{% else %}
|
||||
virus_scan.Allow204Responces off
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.passonerror') and OPNsense.cicap.antivirus.passonerror != '' %}
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.passonerror') and OPNsense.cicap.antivirus.passonerror == '1' %}
|
||||
virus_scan.PassOnError on
|
||||
{% else %}
|
||||
virus_scan.PassOnError off
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.cmaxobjectsize') and OPNsense.cicap.antivirus.maxobjectsize != '' %}
|
||||
virus_scan.MaxObjectSize 5M
|
||||
{% if helpers.exists('OPNsense.cicap.antivirus.maxobjectsize') and OPNsense.cicap.antivirus.maxobjectsize != '' %}
|
||||
virus_scan.MaxObjectSize {{ OPNsense.cicap.antivirus.maxobjectsize }}
|
||||
{% endif %}
|
||||
Module common clamd_mod.so
|
||||
clamd_mod.ClamdHost 127.0.0.1
|
||||
|
|
|
|||
Loading…
Reference in a new issue