[PR #1987] [MERGED] fix search domains and remove username from magicdns #2434

Closed
opened 2025-12-29 03:21:16 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1987
Author: @kradalby
Created: 6/20/2024
Status: Merged
Merged: 6/26/2024
Merged by: @kradalby

Base: mainHead: kradalby/1963-domains-override


📝 Commits (2)

  • 2070126 fix issue where search domains are ignored
  • 8dfa1d3 remove username from magicdns names

📊 Changes

8 files changed (+184 additions, -64 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 config-example.yaml (+9 -0)
📝 hscontrol/mapper/mapper.go (+29 -25)
📝 hscontrol/mapper/mapper_test.go (+7 -4)
📝 hscontrol/mapper/tail.go (+1 -1)
📝 hscontrol/types/config.go (+16 -13)
📝 hscontrol/types/node.go (+17 -8)
📝 hscontrol/types/node_test.go (+101 -13)

📄 Description

This commit fixes an issue where search domains was ignored
if the user has not configured any external resolvers. Based
on tailscale's documentation, there is no mention of this
behaviour as far as I can see:
https://tailscale.com/kb/1054/dns#search-domains

In addition, it does add the missing base domain to the
search domain.

and

This commit removes the username from magicDNS names.
This is in preparation of fixing tags, which currently is
not correctly disassociated from users when added. With the
current behaviour, fixing tagged devices would break the
MagicDNS behaviour.

This brings headscale to use the same behaviour of tailscale.

Fixes #1963
Updates #1369


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/1987 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 6/20/2024 **Status:** ✅ Merged **Merged:** 6/26/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/1963-domains-override` --- ### 📝 Commits (2) - [`2070126`](https://github.com/juanfont/headscale/commit/2070126c652a0b3be89a6c3d23bdd20c8b4082bf) fix issue where search domains are ignored - [`8dfa1d3`](https://github.com/juanfont/headscale/commit/8dfa1d3da81ba6ad44a87989137a579f67b8eef1) remove username from magicdns names ### 📊 Changes **8 files changed** (+184 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `config-example.yaml` (+9 -0) 📝 `hscontrol/mapper/mapper.go` (+29 -25) 📝 `hscontrol/mapper/mapper_test.go` (+7 -4) 📝 `hscontrol/mapper/tail.go` (+1 -1) 📝 `hscontrol/types/config.go` (+16 -13) 📝 `hscontrol/types/node.go` (+17 -8) 📝 `hscontrol/types/node_test.go` (+101 -13) </details> ### 📄 Description This commit fixes an issue where search domains was ignored if the user has not configured any external resolvers. Based on tailscale's documentation, there is no mention of this behaviour as far as I can see: https://tailscale.com/kb/1054/dns#search-domains In addition, it does add the missing base domain to the search domain. and This commit removes the username from magicDNS names. This is in preparation of fixing tags, which currently is not correctly disassociated from users when added. With the current behaviour, fixing tagged devices would break the MagicDNS behaviour. This brings headscale to use the same behaviour of tailscale. Fixes #1963 Updates #1369 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:21:16 +01:00
adam closed this issue 2025-12-29 03:21:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2434