Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Accept the top-level domain name in the network dns setting #506

Closed
1248289414 opened this issue Aug 22, 2024 · 0 comments · Fixed by #507
Closed

[Feature Request]: Accept the top-level domain name in the network dns setting #506

1248289414 opened this issue Aug 22, 2024 · 0 comments · Fixed by #507
Labels
enhancement New feature or request

Comments

@1248289414
Copy link

🚀 Feature Summary

Accept the top-level domain name in the network dns setting.

📝 Detailed Description

Currently, when setting up dns for a network, ztnet only accepts subdomains,

export function isValidDomain(domain: string): boolean {
const domainRegex = /^(?!-)[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/;
return domainRegex.test(domain);
}

but in zerotier.com, a top-level domain (e.g. .lan) is also a valid value.
image
And, it seems that Zerotier's DNS system only requires domain names to less than 128 characters in length?
https://github.com/zerotier/ZeroTierOne/blob/f176e2539e10e8c0f61eb1d2e1f0e690a267a646/include/ZeroTierOne.h#L976C1-L981C1

🎯 Use Case

Some DHCP/DNS servers support to use a custom top-level domains to get the client's address, such as dnsmasq in Openwrt uses the hostname + .lan to request the client's assigned address.

💡 Willing to Contribute

None

@1248289414 1248289414 added the enhancement New feature or request label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant