-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfig.toml
94 lines (84 loc) · 3.75 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#"Reading from env variable if value is not in toml file feature"
#feature is supported for strings, int, bool, time.duration and string slices only
#(every type used in this project)
#to use this feature you have to do the next
#assume that there is an env variable called LOG_LEVEL and you want to assign LOG_LEVEL value to app.log_level
#You will change the value of (log_level= "debug") to (log_level= "$_LOG_LEVEL")
#If you want to add an array as an env variable in your machine, please add backslash before special characters
#like white spaces, double quotes and comas, example:
#export ARRAY= "[\"txt\", \"pdf\", \"dmg\", \"exe\", \"com\", \"rar\", \"unknown\"]"
#Don't forget to put the value between double quotes in case there are white spaces in the value.
#NOTE: before you use this feature please make sure that the env variable that you want to use is globally in
# your machine and not just exported in a local session
title = "ICAP configuration file"
[app]
port = 1344
log_level="debug"
write_logs_to_console= false
services= ["echo", "clhashlookup", "clamav"]
debugging_headers=true
web_server_host = "$_WEB_SERVER_HOST" #Example: "localhost:8081" , replace localhost with the ICAP server IP address.
web_server_endpoint = "/service/message"
[echo]
vendor = "echo"
service_caption= "echo service" #Service
service_tag = "ECHO ICAP" #ISTAG
req_mode=true
resp_mode=true
shadow_service=false
preview_bytes = "1024" #byte
preview_enabled = true# options send preview header or not
process_extensions = ["pdf", "zip", "com"] # * = everything except the ones in bypass, unknown = system couldn't find out the type of the file
reject_extensions = ["docx"]
bypass_extensions = ["*"]
#max file size value from 1 to 9223372036854775807, and value of zero means unlimited
max_filesize = 0 #bytes
return_original_if_max_file_size_exceeded=false
return_400_if_file_ext_rejected=false
[clhashlookup]
vendor = "clhashlookup"
service_caption= "cl-hashlookup" #Service
service_tag = "cl-hashlookup ICAP" #ISTAG
req_mode=true
resp_mode=true
shadow_service=false
preview_bytes = "1024" #byte
preview_enabled = true# options send preview header or not
bypass_extensions = ["*"]
process_extensions = ["pdf","exe", "zip"] # * = everything except the ones in bypass, unknown = system couldn't find out the type of the file
reject_extensions = ["docx"]
scan_url = "https://hashlookup.circl.lu/lookup/sha256/" #
timeout = 300 #seconds , ICAP will return 408 - Request timeout
fail_threshold = 2
max_filesize = 0 #bytes
return_original_if_max_file_size_exceeded=true
return_400_if_file_ext_rejected=false
verify_server_cert=true
bypass_on_api_error=false
http_exception_response_code = 403
http_exception_has_body = true
exception_page = "./temp/exception-page.html" # Location of the exception page for this service
[clamav]
vendor = "clamav"
service_caption= "clamav service" #Service
service_tag = "CLAMAV ICAP" #ISTAG
req_mode=true
resp_mode=true
shadow_service=false
preview_bytes = "1024" #byte
preview_enabled = true# options send preview header or not
process_extensions = ["pdf", "zip", "com"] # * = everything except the ones in bypass, unknown = system couldn't find out the type of the file
reject_extensions = ["docx"]
bypass_extensions = ["*"]
socket_path = "/var/run/clamav/clamd.ctl"
fail_threshold = 2
timeout = 10 #seconds, the time upto which the server will wait for clamav to scan the results
#max file size value from 1 to 9223372036854775807, and value of zero means unlimited
max_filesize = 0 #bytes
return_original_if_max_file_size_exceeded=false
return_400_if_file_ext_rejected=false
verify_server_cert=true
bypass_on_api_error=false
http_exception_response_code = 403
http_exception_has_body = true
exception_page = "./temp/exception-page.html" # Location of the exception page for this service