feat: accept suffix as string or array in [[forwarding]] rules

Reuses existing string_or_vec deserializer so users can write:
  suffix = ["168.192.in-addr.arpa", "onsite"]
instead of repeating [[forwarding]] blocks per suffix.
This commit is contained in:
Razvan Dimescu
2026-04-12 05:29:49 +03:00
parent f264cea5b4
commit a757b98744
3 changed files with 81 additions and 45 deletions

View File

@@ -46,12 +46,12 @@ api_port = 5380
# ]
# [[forwarding]] # per-suffix conditional forwarding rules
# suffix = "168.192.in-addr.arpa" # all PTR lookups for 192.168.x.x
# upstream = "100.90.1.63:5361" # → sent to this upstream
# suffix = "168.192.in-addr.arpa" # single suffix → one upstream
# upstream = "100.90.1.63:5361"
#
# [[forwarding]]
# suffix = "home.local" # all lookups under home.local
# upstream = "10.0.0.1" # → sent to this upstream (port 53 default)
# suffix = ["home.local", "home.arpa"] # multiple suffixes → same upstream
# upstream = "10.0.0.1" # port 53 default
# [blocking]
# enabled = true # set to false to disable ad blocking