Node.JS 中的简单 DNS 服务器?(主要/权威 DNS 服务器)(也许是 ndns?)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5539782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 13:59:37  来源:igfitidea点击:

Simple DNS Server in Node.JS? (Primary/Authoritative DNS Server) (maybe ndns?)

node.jsdnsndns

提问by Bryan Field

Does anybody know of a DNS Server that is written in Node.JS? I am specifically interested in Authoritative DNS Servers (as opposed to caching DNS server).

有人知道用 Node.JS 编写的 DNS 服务器吗?我对权威 DNS 服务器(而不是缓存 DNS 服务器)特别感兴趣。

The only thing this needs to do is to serve A, MX, TXT, SPF, SOA, NS records based on my own algorithm which I will write into a fork or clone of whatever I find to start with.

唯一需要做的就是根据我自己的算法为 A、MX、TXT、SPF、SOA、NS 记录提供服务,我会将这些记录写入我发现的任何内容的分叉或克隆中。

In fact I may not need all of those types of records. But the important thing is that it must work.I do notwant to have DNS debugging issues. I am hoping (expecting) this will not be a problem because DNS is very simple (I have heard).

事实上,我可能不需要所有这些类型的记录。但重要的是它必须有效。希望有DNS调试问题。我希望(期待)这不会成为问题,因为 DNS 非常简单(我听说过)。

Is there anything in Node.JS I can start with? If you know that something has been used in production, then please let me know.

我可以从 Node.JS 开始吗?如果您知道某些东西已用于生产,请告诉我。



The Node.JS DNS Servers I have foundare

我发现的 Node.JS DNS 服务器

If anyone is using one for production, I would like to know. So far they seem to be very scattered efforts.

如果有人将其用于生产,我想知道。到目前为止,他们的努力似乎很分散。

回答by psema4

Here's "a very basic authority server built with Node.js", in < 500 lines: dnsserver.js

这是“使用 Node.js 构建的非常基本的授权服务器”,不到500 行:dnsserver.js

回答by oshimin

I found a DNS server write in node.js fun_dnsthe source is on github

我在 node.js fun_dns 中找到了一个 DNS 服务器,源代码在github 上

回答by Jeppe Fihl-Pearson

Since Java is okay for you, you could have a look at the Eagle DNS project. It is written in Java and supports both MySQL and file based stores for the records, and allow you to write your own module if that doesn't fit your needs: http://www.unlogic.se/projects/eagledns

由于 Java 适合您,您可以查看 Eagle DNS 项目。它是用 Java 编写的,支持 MySQL 和基于文件的记录存储,如果不符合您的需要,允许您编写自己的模块:http: //www.unlogic.se/projects/eagledns