Skip to content

Commit

Permalink
fix: make sure the SOA is at the public user domain parent, not the a…
Browse files Browse the repository at this point in the history
…pp domain.
  • Loading branch information
zicklag committed Nov 5, 2024
1 parent bb20d08 commit 14f3953
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/dns/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export async function startDnsServer() {

const question = req.packet.questions[0];
if (question.type == 'SOA') {
if (question.name.endsWith(pubenv.PUBLIC_DOMAIN)) {
if (question.name.endsWith(pubenv.PUBLIC_USER_DOMAIN_PARENT)) {
res.packet.flags = res.packet.flags | AUTHENTIC_DATA;
return res.answer({
type: 'SOA',
name: pubenv.PUBLIC_DOMAIN,
name: pubenv.PUBLIC_USER_DOMAIN_PARENT,
data: {
mname: DNS_MASTER,
rname: DNS_EMAIL
Expand All @@ -115,7 +115,7 @@ export async function startDnsServer() {

const question = req.packet.questions[0];
if (question.type == 'NS') {
if (question.name == pubenv.PUBLIC_DOMAIN) {
if (question.name == pubenv.PUBLIC_USER_DOMAIN_PARENT) {
res.packet.flags = res.packet.flags | AUTHENTIC_DATA;
return res.answer(
DNS_NAMESERVERS.map((ns) => ({
Expand Down

0 comments on commit 14f3953

Please sign in to comment.