-
Notifications
You must be signed in to change notification settings - Fork 286
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
Make Root nameserver more flexible for plugins #558
Conversation
Pull Request Test Coverage Report for Build 622382144
💛 - Coveralls |
All of the use cases for this modification are exemplified in this WIP hsd plugin: https://github.com/pinheadmz/holdmyhand The one exception might be "alternative DNS systems" but the plugin can force lookup of certain names to ICANN (before checking the HNS root zone) and it should be clear to developers that the same method can be used to redirect queries to other systems resolvers like ENS, IPFS, Sia, Footnote, etc. They will just have to return a |
ccbc985
to
3852599
Compare
Moving the guide to hsd-dev.org, stay tuned for PR over there... |
Converted to draft while working on more plugin implementations and ensure everything is properly covered. |
8f75494
to
0bb5f4b
Compare
a7fd332
to
1cc2086
Compare
Okay I think this one is ready. It should be a total NO-OP unless a user has a plugin installed, examples include https://github.com/imperviousinc/handover and https://github.com/pinheadmz/holdmyhand. Docs will be updated when merged, working on that here: handshake-org/handshake-org.github.io#113 |
Nice! I tried holdmyhand and handover. Having the ability to customize how the root nameserver works with plugins is going to be very useful. |
// lookup for special TLDs before checking Urkel tree. | ||
// We also pass the entire question in case a plugin | ||
// is able to return an authoritative (non-referral) answer. | ||
if (typeof this.middle === 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe hook or resolveHook would be more intuitive name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, appreciate the feedback. I've already written two plugins using this and documented the middle()
property here: https://hsd-dev.org/guides/plugins.html 🤷♂️
Closes #541
TODO: Include example plugins to close...