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

Add gateway to receive requests with suffix #12

Merged
merged 13 commits into from
Mar 15, 2020

Conversation

nulven
Copy link

@nulven nulven commented Mar 13, 2020

Added configurations to:

  • Strip DNSSEC signatures
  • Rewrite the start of authority
  • Remove a suffix from the zone query

Full-node environment variables:
SOA_REWRITE: string; nameserver domain
SUFFIX: string; host zone
DNSSEC: boolean; strip dnssec signatures

lib/dns/server.js Outdated Show resolved Hide resolved
lib/dns/server.js Outdated Show resolved Hide resolved
lib/dns/server.js Outdated Show resolved Hide resolved
lib/dns/server.js Outdated Show resolved Hide resolved
lib/dns/server.js Outdated Show resolved Hide resolved
const type = req.question[0].type;
let changed;
// If domain in the form *.hsd.zone., query only the hsd.zone. subdomain
if (this.suffix) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse this code?

lib/dns/server.js Outdated Show resolved Hide resolved
lib/dns/server.js Outdated Show resolved Hide resolved
lib/node/fullnode.js Outdated Show resolved Hide resolved
lib/node/fullnode.js Outdated Show resolved Hide resolved
lib/dns/server.js Outdated Show resolved Hide resolved
changed = true;
}
}
return req, changed;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not go

if (res.answer.length !== 0) {
res.answer[0].name = name;
}
return req, res;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid

@turbomaze turbomaze merged commit 1835653 into production-namebase Mar 15, 2020
@turbomaze turbomaze deleted the nick-dns-gateway branch March 15, 2020 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants