mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-04 02:51:28 +02:00
This function is responisible for downloading and converting the blocklist into an ipset compatible format. The only required argument is the blocklist (in upper letter format) which should be performed. It automatically will setup an upstream proxy (if configured) and grab the file specified in the blocklist vendor configuration hash. There is a maximum amount of five attempts until the script gives up and returns a "dl_error". In case the server responses with "Not Modified" (Code 304) a "not_modified" will be returned. If the blocklist successfully has been grabbed, the modification date get stored for further purposes and the list content will be converted and stored in an ipset compatible format. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Inspired-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>