From 9734f0c7040a983cb6c8bb41d8213fcdbd837985 Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Sat, 18 Jan 2025 13:22:43 +0000 Subject: [PATCH] chore: remove old username in dns option --- app/routes/dns/overview.tsx | 4 +--- app/routes/machines/overview.tsx | 4 ---- app/utils/config/headscale.ts | 1 - test/config.yaml | 9 --------- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/app/routes/dns/overview.tsx b/app/routes/dns/overview.tsx index 9888a5e..7a502fb 100644 --- a/app/routes/dns/overview.tsx +++ b/app/routes/dns/overview.tsx @@ -25,9 +25,7 @@ export async function loader() { const dns = { prefixes: config.prefixes, magicDns: config.dns.magic_dns, - baseDomain: config.dns.use_username_in_magic_dns - ? `[user].${config.dns.base_domain}` - : config.dns.base_domain, + baseDomain: config.dns.base_domain, nameservers: config.dns.nameservers.global, splitDns: config.dns.nameservers.split, searchDomains: config.dns.search_domains, diff --git a/app/routes/machines/overview.tsx b/app/routes/machines/overview.tsx index 4e9c170..7a1f693 100644 --- a/app/routes/machines/overview.tsx +++ b/app/routes/machines/overview.tsx @@ -38,10 +38,6 @@ export async function loader({ request, context: lC }: LoaderFunctionArgs) { if (config.dns.magic_dns) { magic = config.dns.base_domain; } - - if (config.dns.use_username_in_magic_dns) { - magic = `[user].${magic}`; - } } return { diff --git a/app/utils/config/headscale.ts b/app/utils/config/headscale.ts index 5122792..cdbb696 100644 --- a/app/utils/config/headscale.ts +++ b/app/utils/config/headscale.ts @@ -119,7 +119,6 @@ const HeadscaleConfig = z.object({ }), ) .default([]), - use_username_in_magic_dns: goBool.default(false), }), oidc: z diff --git a/test/config.yaml b/test/config.yaml index d66df0c..1eeac5b 100644 --- a/test/config.yaml +++ b/test/config.yaml @@ -308,15 +308,6 @@ dns: # # you can also put it in one line # - { name: "prometheus.myvpn.example.com", type: "A", value: "100.64.0.3" } - # DEPRECATED - # Use the username as part of the DNS name for nodes, with this option enabled: - # node1.username.example.com - # while when this is disabled: - # node1.example.com - # This is a legacy option as Headscale has have this wrongly implemented - # while in upstream Tailscale, the username is not included. - use_username_in_magic_dns: false - # Unix socket used for the CLI to connect without authentication # Note: for production you will want to set this to something like: unix_socket: /var/run/headscale/headscale.sock