ClamAV Private Mirror
How To Use
go get -v ./... && go build -v . && PRIMARY_MIRROR="https://database.clamav.net" ./clamav
What It Does
- Starts an asynchronous download of the current antivirus definitions.
- Downloads three databases:
main
bytecode
daily
- Parses each database's header for similar versions.
- If there is a similar/related version, it also gets downloaded.
- Downloaded files are stored in-memory in a cache for client downloads.
- Downloads three databases:
- Initialises a cron job to download the new database definitions every hour.
- Starts the web server and serves from cache.
- Evicts files from cache every 3 hours to prevent stale definitions.
Mirrors
In order to function properly as a localised cache, you need to set the PRIMARY_MIRROR
environment variable. Below is a short list of known mirrors.
If for some reason the primary mirror fails, if you set SECONDARY_MIRROR
, it will try that one.
Contributing
- Keep It Simple.
To unzip the CVD files:
cd filedefs/ && tail -c $(expr $(wc -c $FILE.cvd | awk '{print $1}') - 512) $FILE.cvd | tar zxvf -