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 at master · slundi/dgaard

Expand file tree

/

dgaard-daemon

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

dgaard-daemon

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
tests
tests
 
 
AGENT.md
AGENT.md
 
 
Cargo.toml
Cargo.toml
 
 
Config.toml
Config.toml
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 

README.md

Outline

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.