lazydns

IP_SET Plugin

The ip_set plugin provides a lightweight IP dataset: it loads IP addresses and CIDR ranges from files or inline entries, exposes the compiled networks for other plugins to use, and supports auto-reload on file changes.

This page documents configuration, data formats, usage, and integration patterns.

Purpose

Key behaviors

Supported data formats

Invalid lines are skipped and logged at debug level.

Configuration

Top-level plugin arguments (YAML) supported by ip_set:

Example configuration (file-backed):

plugins:
  - tag: local-ips
    type: ip_set
    config:
      files:
        - examples/etc/china-ip-list.txt
      auto_reload: true

Example configuration (inline):

plugins:
  - tag: test-ips
    type: ip_set
    config:
      ips:
        - 1.1.1.1
        - 192.168.0.0/16
        - 2001:db8::/32

Usage & integration

Auto-reload behavior

Diagnostics & stats

Troubleshooting

Best practices

Example pipeline

[Downloader plugin] -> updates files
        |
   [ip_set plugin] -> loads networks, sets metadata
        |
   [ipset plugin] -> reads metadata / response and materializes sets

See also