https://github.com/siennathesane/clamav
ClamAV Private Mirror with Cache.
https://github.com/siennathesane/clamav
clamav clamav-private-mirror golang talos
Last synced: 4 months ago
JSON representation
ClamAV Private Mirror with Cache.
- Host: GitHub
- URL: https://github.com/siennathesane/clamav
- Owner: siennathesane
- License: mit
- Created: 2017-03-08T18:06:17.000Z (over 8 years ago)
- Default Branch: mainline
- Last Pushed: 2022-12-23T22:07:52.000Z (almost 3 years ago)
- Last Synced: 2025-06-15T19:16:15.802Z (4 months ago)
- Topics: clamav, clamav-private-mirror, golang, talos
- Language: Go
- Size: 5.35 MB
- Stars: 14
- Watchers: 2
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## ClamAV Private Mirror
[](http://www.apache.org/licenses/LICENSE-2.0.html)
[](https://travis-ci.org/mxplusb/clamav)### How To Use
* `go get -v ./... && go build -v . && PRIMARY_MIRROR="https://database.clamav.net" ./clamav`
### What It Does
1. Starts an asynchronous download of the current antivirus definitions.
1. Downloads three databases:
1. `main`
1. `bytecode`
1. `daily`
1. Parses each database's header for similar versions.
1. If there is a similar/related version, it also gets downloaded.
1. Downloaded files are stored in-memory in a cache for client downloads.
1. Initialises a cron job to download the new database definitions every hour.
1. Starts the web server and serves from cache.
1. 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.
* http://database.clamav.net
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 -`