Repository navigation
Create PTR records for every IPv6 address of a cloaked name - #3419
Merged
Merged
Conversation
With cloak_ptr, the PTR record of an IPv6 rule was always built from the first IPv6 address of the name. A second address got no PTR record, and the first one got the name twice.
jedisct1
added a commit
that referenced
this pull request
Nov 12, 2026
* 'master' of github.com:DNSCrypt/dnscrypt-proxy: Create PTR records for every IPv6 address of a cloaked name (#3419)
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.
With
cloak_ptr = trueand a name cloaked to more than one IPv6 address, only the first address resolves back to the name. With these cloaking rules:a PTR query for
fd00::11is not answered by the cloaking plugin (it goes upstream), and the one forfd00::10returnsnas.home.test.twice. The same rules with two IPv4 addresses work.When a rule is loaded, the IPv4 branch reverses the address of the current line, but the IPv6 branch reverses
cloakedName.ipv6[0], the first IPv6 address collected for that name: plugin_cloak.go#L124-L139. It now uses the address of the current line as well.Tested with a new unit test loading two IPv4 and two IPv6 addresses for one name (before: no PTR record for the second IPv6 address and a duplicate for the first;
go testandgo vetpass after), and with the built proxy in offline mode queried over UDP: before, PTR forfd00::11is NXDOMAIN from the upstream stub andfd00::10has two identical records; after, each address has onenas.home.test.record.