93 lines
2.3 KiB
TOML
93 lines
2.3 KiB
TOML
[server]
|
|
listen_address = ":8080"
|
|
storage_path = "/srv/hmac-file-server/uploads"
|
|
metrics_enabled = true
|
|
metrics_path = "/metrics"
|
|
pid_file = "/var/run/hmac-file-server.pid"
|
|
max_upload_size = "10GB" # Supports B, KB, MB, GB, TB
|
|
max_header_bytes = 1048576 # 1MB
|
|
cleanup_interval = "24h"
|
|
max_file_age = "720h" # 30 days
|
|
pre_cache = true
|
|
pre_cache_workers = 4
|
|
pre_cache_interval = "1h"
|
|
global_extensions = [".txt", ".dat", ".iso"] # If set, overrides upload/download extensions
|
|
deduplication_enabled = true
|
|
min_free_bytes = "1GB" # Minimum free space required for uploads
|
|
file_naming = "original" # Options: "original", "HMAC"
|
|
force_protocol = "" # Options: "http", "https" - if set, redirects to this protocol
|
|
enable_dynamic_workers = true # Enable dynamic worker scaling
|
|
worker_scale_up_thresh = 50 # Queue length to scale up workers
|
|
worker_scale_down_thresh = 10 # Queue length to scale down workers
|
|
|
|
[uploads]
|
|
allowed_extensions = [".zip", ".rar", ".7z", ".tar.gz", ".tgz", ".gpg", ".enc", ".pgp"]
|
|
chunked_uploads_enabled = true
|
|
chunk_size = "10MB"
|
|
resumable_uploads_enabled = true
|
|
max_resumable_age = "48h"
|
|
|
|
[downloads]
|
|
resumable_downloads_enabled = true
|
|
chunked_downloads_enabled = true
|
|
chunk_size = "8192"
|
|
allowed_extensions = [".txt", ".pdf", ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".svg", ".webp"]
|
|
|
|
[security]
|
|
secret = "f6g4ldPvQM7O2UTFeBEUUj33VrXypDAcsDt0yqKrLiOr5oQW"
|
|
enablejwt = false
|
|
jwtsecret = "f6g4ldPvQM7O2UTFeBEUUj33VrXypDAcsDt0yqKrLiOr5oQW"
|
|
jwtalgorithm = "HS256"
|
|
jwtexpiration = "24h"
|
|
|
|
[logging]
|
|
level = "info"
|
|
file = "/var/log/hmac-file-server.log"
|
|
max_size = 100
|
|
max_backups = 7
|
|
max_age = 30
|
|
compress = true
|
|
|
|
[deduplication]
|
|
enabled = true
|
|
directory = "./deduplication"
|
|
|
|
[iso]
|
|
enabled = true
|
|
size = "1GB"
|
|
mountpoint = "/mnt/iso"
|
|
charset = "utf-8"
|
|
containerfile = "/mnt/iso/container.iso"
|
|
|
|
[timeouts]
|
|
readtimeout = "4800s"
|
|
writetimeout = "4800s"
|
|
idletimeout = "4800s"
|
|
|
|
[versioning]
|
|
enableversioning = false
|
|
maxversions = 1
|
|
|
|
[clamav]
|
|
clamavenabled = true
|
|
clamavsocket = "/var/run/clamav/clamd.ctl"
|
|
numscanworkers = 2
|
|
scanfileextensions = [".txt", ".pdf", ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".svg", ".webp"]
|
|
|
|
[redis]
|
|
redisenabled = true
|
|
redisdbindex = 0
|
|
redisaddr = "localhost:6379"
|
|
redispassword = ""
|
|
redishealthcheckinterval = "120s"
|
|
|
|
[workers]
|
|
numworkers = 4
|
|
uploadqueuesize = 50
|
|
|
|
[file]
|
|
# Add file-specific configurations here
|
|
|
|
[build]
|
|
version = "3.2"
|