feat(config): support multiple static IP addresses - #36
Merged
olicesx merged 4 commits intoAug 11, 2026
Conversation
Allow static_ip_response to accept comma-separated IPv4 and IPv6 addresses. Validate the list atomically and share response construction across normal, response-action, and precomputed paths.
Owner
Review Conclusion: Ready to Merge (No Blockers)Core mechanisms verified through dual-channel validation (direct code reading + independent agent cross-check). ✅ Verified
🟢 Notes (non-blocking)
❓ Question (needs project decision, non-blocking)Should NODATA include an SOA authority record? HTTPS/SVCB → NOERROR + empty answer, no SOA (RFC 2308 §2.2 SHOULD). However, all static responses in the project (StaticResponse/TXT/IP) currently omit SOA by design; adding SOA would change existing behavior and needs a project decision. 📌 Pre-existing issue (unrelated to this PR, suggest filing separately)dns_cache's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
static_ip_response.ipto contain comma-separated IPv4 and IPv6 addressesipv4hintoripv6hintExample
{ "type": "static_ip_response", "ip": "192.0.2.1,2001:db8::1" }Behavior
Scope boundary
This PR controls how a selected
static_ip_responseaction constructs its DNS answer. It does not decide whether an upstream HTTPS/SVCB response belongs to a GeoIP tag and does not inspectipv4hint/ipv6hintfor matching. That response-classification behavior is handled separately by PR #37.When both PRs are used together, PR #37 can match an upstream HTTPS/SVCB address hint, and this PR then ensures the selected static IP action returns NOERROR/NODATA for the HTTPS/SVCB query instead of synthesizing an invalid service-binding record.
Validation
cargo fmt --all -- --checkcargo test(110 unit tests, 6 listener tests, 9 DoH integration tests, 10 doctests)cargo clippy --all-targets --all-features -- -D warningsgit diff --check