Rewrite host masking with IPv6 support and hex hashes
authorRemco Rijnders <remmy@serenity-irc.net>
Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)
committerRemco Rijnders <remmy@serenity-irc.net>
Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)
commit437f5a63b2dfb0a45165e860e38f42c7817d1517
tree1065c89e87ff84d95a3dd4e5a3e0efec40dcf4c8
parent03962dd47ac4dd2979a7e51a76415c18af91e740
Rewrite host masking with IPv6 support and hex hashes

Replaces the old decimal-digit masking with a cleaner hex-based hash
that handles IPv6, IPv4, and hostnames consistently:
  - IPv6: SereneAB12CD.2601:540:ce00 (preserves /48 prefix)
  - IPv4: SereneAB12CD.192.168.1 (preserves /24 prefix)
  - Hostname: SereneAB12CD.example.com (preserves domain)

The mask prefix is configurable via mask_prefix in the network{} block.
Also adds mask_suffix config key (reserved for future use).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
doc/example.conf
include/settings.h
src/masking.c
src/s_conf.c
src/settings.c