[Feature] Support for node attributes (nodeattrs) #897

Open
opened 2025-12-29 02:25:33 +01:00 by adam · 4 comments
Owner

Originally created by @nielscil on GitHub (Dec 28, 2024).

Use case

I would like to use headscale and NextDNS together. Tailscale supports configuring different profiles using node attributes. This is something I would like to use in headscale too.

In addition some other features also need the use of node attributes, like #2146

Description

This feature request would implement the use of nodeattrs inside the policy file and support nextDNS profile options as metioned in the official tailscale docs.

example of policy

{
	"acls": ["..."],
	"nodeAttrs": [
		{
			"target": ["*"],
			"attr": [
                                "nextdns:abc123",
				"nextdns:no-device-info",
			],
		},
	],
}

this issue is a duplicate of #1407, but is closed because it got stale.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

  • Add nodeAttrs to policy file and parse inside ACLPolicy
  • Retrieve attributes in mapper.go
  • When using NextDNS DOH (already checked in mapper.go)
    • When nextdns-attribute is provided, change the profile of the uri
    • When nextdns:no-device-info is provided, skip adding the extra device info (currently done in mapper.go)
  • Add attributes to tnode.CapMap inside tail.go.
Originally created by @nielscil on GitHub (Dec 28, 2024). ### Use case I would like to use headscale and NextDNS together. Tailscale supports configuring different profiles using node attributes. This is something I would like to use in headscale too. In addition some other features also need the use of node attributes, like #2146 ### Description This feature request would implement the use of `nodeattrs` inside the policy file and support nextDNS profile options as metioned in the official [tailscale docs](https://tailscale.com/kb/1218/nextdns). example of policy ``` json { "acls": ["..."], "nodeAttrs": [ { "target": ["*"], "attr": [ "nextdns:abc123", "nextdns:no-device-info", ], }, ], } ``` _this issue is a duplicate of #1407, but is closed because it got stale._ ### Contribution - [ ] I can write the design doc for this feature - [X] I can contribute this feature ### How can it be implemented? - Add `nodeAttrs` to policy file and parse inside `ACLPolicy` - Retrieve attributes in `mapper.go` - When using NextDNS DOH (already checked in `mapper.go`) - When `nextdns`-attribute is provided, change the profile of the uri - When `nextdns:no-device-info` is provided, skip adding the extra device info (currently done in `mapper.go`) - Add attributes to `tnode.CapMap` inside `tail.go`.
adam added the enhancementno-stale-bot labels 2025-12-29 02:25:33 +01:00
Author
Owner

@kradalby commented on GitHub (Dec 29, 2024):

I think we already support nextdns via the config, just not via nodeattrs.

@kradalby commented on GitHub (Dec 29, 2024): I think we already support nextdns via the config, just not via nodeattrs.
Author
Owner

@nielscil commented on GitHub (Dec 29, 2024):

Yeah, but that is on global level, isn't it? I would like to have different profile for different users.

@nielscil commented on GitHub (Dec 29, 2024): Yeah, but that is on global level, isn't it? I would like to have different profile for different users.
Author
Owner

@mindolo commented on GitHub (Aug 8, 2025):

Hello!

Just wanted to note that support for node attributes would be critical for enabling MagicDNS AAAA records, a feature recently added to Tailscale (1.84+).

This is now supported via a new magicdns-aaaa node attribute, as seen in this upstream issue: https://github.com/tailscale/tailscale/issues/1152

Implementing this would also resolve the functionality requested in this old and closed issue: https://github.com/juanfont/headscale/issues/1027

And btw, thank you for headscale.

@mindolo commented on GitHub (Aug 8, 2025): Hello! Just wanted to note that support for node attributes would be critical for enabling MagicDNS AAAA records, a feature recently added to Tailscale (1.84+). This is now supported via a new `magicdns-aaaa` node attribute, as seen in this upstream issue: https://github.com/tailscale/tailscale/issues/1152 Implementing this would also resolve the functionality requested in this old and closed issue: https://github.com/juanfont/headscale/issues/1027 And btw, thank you for headscale.
Author
Owner

@tywil04 commented on GitHub (Oct 16, 2025):

Just to bump, support for nodeAttrs would (I believe) enable support for Taildrive: https://tailscale.com/kb/1369/taildrive.

@tywil04 commented on GitHub (Oct 16, 2025): Just to bump, support for `nodeAttrs` would (I believe) enable support for Taildrive: https://tailscale.com/kb/1369/taildrive.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#897