Skip to content

Allow including additional HTTP headers with any .nextdns.io subdomain - #335

Closed
mike406 wants to merge 1 commit into
Control-D-Inc:mainfrom
mike406:nextdns-subdomains
Closed

mike406 wants to merge 1 commit into
Control-D-Inc:mainfrom
mike406:nextdns-subdomains

Conversation

@mike406

@mike406 mike406 commented Sep 12, 2026 •

Copy link
Copy Markdown

NextDNS provides various DoH subdomains to allow for customized steering. Currently ctrld only considers dns.nextdns.io as valid but there are other options such as:

ultralow.dns.nextdns.io
ultralow.dns1.nextdns.io
ultralow.dns2.nextdns.io
anycast.dns.nextdns.io
anycast.dns1.nextdns.io
anycast.dns2.nextdns.io

This PR aims to allow ctrld to pass X-Device- HTTP headers when any subdomain of nextdns.io is specified in the DoH endpoint.

@cuonglm

cuonglm commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

@mike406 Thanks for the PR.

Due to our internal development process, we can't merge this PR at this moment, but your changes was cherry-picked and credit in future release.

We will make the contributing process more friendly in the (hopefully near) future.

cuonglm added a commit that referenced this pull request Sep 22, 2026
NextDNS serves alternative DoH endpoints beside dns.nextdns.io: the
ultralow and anycast variants of dns, dns1 and dns2. They are the same
service and take the same client info headers, but isNextDNS matched
the one host, so an upstream pointed at any of them was treated as a
third party and sent no client info.

Recognition now follows the parent domain through dns.IsSubDomain, as
IsControlD already does for the ControlD domains. The label by label
comparison is case insensitive and keeps lookalikes such as
notnextdns.io and nextdns.io.example.com out.

Based on the change proposed by Mike (Github username @mike406).
See: #335.
cuonglm added a commit that referenced this pull request Sep 22, 2026
NextDNS serves alternative DoH endpoints beside dns.nextdns.io: the
ultralow and anycast variants of dns, dns1 and dns2. They are the same
service and take the same client info headers, but isNextDNS matched
the one host, so an upstream pointed at any of them was treated as a
third party and sent no client info.

Recognition now follows the parent domain through dns.IsSubDomain, as
IsControlD already does for the ControlD domains. The label by label
comparison is case insensitive and keeps lookalikes such as
notnextdns.io and nextdns.io.example.com out.

Based on the change proposed by Mike (Github username @mike406).
See: #335.
@cuonglm cuonglm mentioned this pull request Sep 28, 2026
@cuonglm

cuonglm commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

@mike406 Your PR is now credit in #344

Thanks again for your contribution.

@cuonglm cuonglm closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants