lazydns

Downloader Plugin

downloader is an exec plugin used to download remote rule files (or other artifacts) and atomically write them to local paths. It is commonly used together with cron for scheduled updates of dataset files.

Supported modes

Arguments

Example — direct plugin

plugins:
  - tag: file_downloader
    type: downloader
    args:
      files:
        - url: "https://example.com/reject-list.txt"
          path: "examples/reject-list.txt"
        - url: "https://example.com/gfw.txt"
          path: "examples/gfw.txt"
      timeout_secs: 30
      concurrent: false
      max_retries: 3
      retry_delay_secs: 2

Example — invoked by cron

- tag: cron_scheduler
  type: cron
  args:
    jobs:
      - name: update_rules
        cron: "0 0 */6 * * *" # every 6 hours
        action:
          invoke_plugin:
            type: "downloader"
            args:
              files:
                - url: "https://example.com/reject-list.txt"
                  path: "examples/reject-list.txt"
              timeout_secs: 30
              concurrent: false

Behavior details

Troubleshooting

Notes