GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dgaard/dgaard-daemon/README.md at master · slundi/dgaard

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
73 lines (48 loc) · 2.27 KB
/

README.md

Copy path

File metadata and controls

73 lines (48 loc) · 2.27 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

dgaard-daemon

Unix socket daemon that wraps dgaard-engine. Evaluates domain strings against the engine's static filters and heuristics and returns a JSON suspicion score. Does not perform DNS resolution.

Designed as a sidecar for MTAs (Postfix, Rspamd), spam filters, or any local process that can write to a Unix socket.

Wire Protocol

One domain per connection — reconnect for each query (stateless).

Input: newline-terminated UTF-8 domain string

malware-c2.xyz\n

Output: newline-terminated JSON

{"score":7,"blocked":true,"action":"Block(HighEntropy(4.52))","reasons":["HighEntropy(4.52)"]}\n

Error responses:

{"error":"empty domain"}\n
{"error":"domain exceeds 253 bytes"}\n

Configuration

Config is discovered in order: --config <path>, /etc/dgaard-daemon/dgaard-daemon.toml, ./dgaard-daemon.toml. All fields have defaults — the daemon starts without a config file.

socket_path = "/run/dgaard-daemon.sock" # Unix socket path (created on startup)
config_file = "/etc/dgaard/dgaard.toml" # Path to the dgaard-engine config
log_level = "info" # env_logger filter string

Quick Start

# Build
cargo build -p dgaard-daemon --release

# Run
dgaard-daemon --config /etc/dgaard-daemon/dgaard-daemon.toml

# Query (one-shot)
echo "malware-c2.xyz" | socat - UNIX-CONNECT:/run/dgaard-daemon.sock

# Reload blocklists without restart
kill -HUP $(pidof dgaard-daemon)

Signals

Signal Behaviour
SIGINT / SIGTERM Graceful shutdown — drains in-flight connections, then exits
SIGHUP Atomically reloads dgaard-engine config and rebuilds FilterEngine

Socket Permissions

The socket file is created with 0o600 (owner read/write only). If the calling process runs under a different UID, either run the daemon as that user or adjust permissions with chmod after startup.

Tests

cargo nextest run -p dgaard-daemon

Integration tests in tests/socket.rs spin up real UnixListener/UnixStream pairs and assert JSON response shape, graceful shutdown, and atomic config-swap behaviour.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.