63 lines
1.7 KiB
TOML
63 lines
1.7 KiB
TOML
# HMAC File Server Configuration with Network Resilience
|
|
# Copy this to config.toml and modify as needed
|
|
|
|
[server]
|
|
bind_ip = "0.0.0.0"
|
|
listenport = "8080"
|
|
unixsocket = false
|
|
storagepath = "./uploads"
|
|
metricsenabled = false
|
|
metricsport = "9090"
|
|
deduplicationenabled = true
|
|
networkevents = true # Enable network change detection
|
|
autoadjustworkers = true
|
|
pidfilepath = "./hmac-file-server.pid"
|
|
|
|
[security]
|
|
secret = "your-super-secret-hmac-key-minimum-32-characters-long"
|
|
enablejwt = false
|
|
# jwtsecret = "your-jwt-secret"
|
|
# jwtalgorithm = "HS256"
|
|
# jwtexpiration = "24h"
|
|
|
|
[uploads]
|
|
chunkeduploadsenabled = true # Enable chunked/resumable uploads
|
|
resumableuploadsenabled = true # Enable upload resumption
|
|
chunksize = "5MB" # Optimal chunk size for mobile
|
|
sessiontimeout = "24h" # How long to keep upload sessions
|
|
maxretries = 5 # Server-side retry attempts
|
|
allowedextensions = [".txt", ".pdf", ".jpg", ".jpeg", ".png", ".gif", ".zip", ".tar", ".gz"]
|
|
maxfilesize = "100MB"
|
|
|
|
[downloads]
|
|
chunkeddownloadsenabled = true
|
|
chunksize = "5MB"
|
|
|
|
[timeouts]
|
|
readtimeout = "300s" # 5 minutes for mobile uploads
|
|
writetimeout = "300s" # 5 minutes for responses
|
|
idletimeout = "600s" # 10 minutes keep-alive
|
|
|
|
[logging]
|
|
level = "info"
|
|
file = "" # Empty = stdout
|
|
max_size = 100
|
|
max_backups = 3
|
|
max_age = 30
|
|
compress = true
|
|
|
|
[workers]
|
|
numworkers = 10
|
|
uploadqueuesize = 1000
|
|
autoscaling = true
|
|
|
|
[redis]
|
|
redisenabled = false # Enable for session persistence
|
|
redisaddr = "localhost:6379"
|
|
redispassword = ""
|
|
redisdbindex = 0
|
|
|
|
[clamav]
|
|
clamavenabled = false # Enable for virus scanning
|
|
clamavsocket = "/var/run/clamav/clamd.ctl"
|