feat: per-suffix conditional forwarding rules in numa.toml (#82)
Adds a `[[forwarding]]` config section so users can explicitly route domain suffixes to specific upstreams. Config-declared rules take precedence over auto-discovered rules (macOS scutil, Linux search domains) via first-match semantics. Example — the reporter's reverse-DNS case: [[forwarding]] suffix = "168.192.in-addr.arpa" upstream = "100.90.1.63:5361" Bare IPs default to port 53. IPv6 is supported via parse_upstream_addr. ForwardingRule::new() constructor replaces direct struct-literal construction, and make_rule() now delegates to parse_upstream_addr to fix a latent IPv6 parsing bug.
This commit is contained in:
@@ -45,6 +45,14 @@ api_port = 5380
|
||||
# "co", "br", "au", "ca", "jp", # other major ccTLDs
|
||||
# ]
|
||||
|
||||
# [[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
|
||||
#
|
||||
# [[forwarding]]
|
||||
# suffix = "home.local" # all lookups under home.local
|
||||
# upstream = "10.0.0.1" # → sent to this upstream (port 53 default)
|
||||
|
||||
# [blocking]
|
||||
# enabled = true # set to false to disable ad blocking
|
||||
# refresh_hours = 24
|
||||
|
||||
Reference in New Issue
Block a user