lazydns 0.2.63

A light and fast DNS server/forwarder implementation in Rust
Documentation
# lazydns example configuration file
# This is a work-in-progress configuration format
# Full configuration documentation will be available as implementation progresses

# NOTE: The legacy `server` configuration section has been removed.
# Server listeners and runtime server configuration are now managed via
# the server launcher and runtime settings (see `src/server/*` for details).

# Log configuration
log:
  level: info           # trace|debug|info|warn|error
  console: true         # Output to console (default: false)
  format: text          # text or json
  # File logging (optional) - uncomment to enable
  # file:
  #   enabled: true
  #   path: /var/log/lazydns/lazydns.log
  #   rotation:
  #     type: both      # time, size, both, or never
  #     period: daily   # daily or hourly
  #     max_size: 10M   # 10MB
  #     max_files: 5

# Plugin execution flow
plugins:
  # Forward to upstream DNS servers
  - tag: forward
    type: forward
    args:
      concurrent: 2
      upstreams:
        - addr: "8.8.8.8:53"
        - addr: "1.1.1.1:53"

  # Add EDNS0 options before forwarding (demo)
  - tag: edns0_options
    type: edns0_opt
    args:
      options:
        - code: 8  # EDNS Client Subnet (ECS)
          data: [0, 1, 24, 0, 192, 168, 1, 0]  # Example ECS data for 192.168.1.0/24
        - code: 10  # DNS Cookie
          data: [1, 2, 3, 4, 5, 6, 7, 8]  # Example cookie data
      preserve_existing: true

  # Simple sequence that adds EDNS0 options and forwards all queries
  - tag: main_sequence
    type: sequence
    args:
      - exec: $edns0_options
      - exec: $forward
      - exec: accept

  # UDP server listening on :5356
  - tag: udp_server
    type: udp_server
    args:
      entry: main_sequence
      listen: ":5354"

  # TCP server listening on :5356
  - tag: tcp_server
    type: tcp_server
    args:
      entry: main_sequence
      listen: ":5354"