![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-named-fixed
Advanced tools
Node-named is a lightweight DNS server written in pure javascript. It has limited support for the DNS spec, but aims to implement all of the common functionality that is in use today.
** This project is not actively maintained ** I've received a lot of great PRs for this project, but I don't have the capacity to actively maintain this library at the moment. I feel strongly about maintaining backwards compatibility for people who rely on it, so any PRs would also need to adhere to keeping the API sane, or contribute to some improvement in performance.
var named = require('./lib/index');
var server = named.createServer();
var ttl = 300;
server.listen(9999, '127.0.0.1', function() {
console.log('DNS server started on port 9999');
});
server.on('query', function(query) {
var domain = query.name();
console.log('DNS Query: %s', domain)
var target = new named.SOARecord(domain, {serial: 12345});
query.addAnswer(domain, target, ttl);
server.send(query);
});
node-named provides helper functions for creating DNS records. The records are available under 'named.record.NAME' where NAME is one of ['A', 'AAAA', 'CNAME', 'SOA', 'MX', 'NS', 'TXT, 'SRV']. It is important to remember that these DNS records are not permanently added to the server. They only exist for the length of the particular request. After that, they are destroyed. This means you have to create your own lookup mechanism.
var named = require('node-named');
var soaRecord = new named.SOARecord('example.com', {serial: 201205150000});
console.log(soaRecord);
The following record types are supported
node-named uses http://github.com/trentm/node-bunyan for logging. It's a lot nicer to use if you npm install bunyan and put the bunyan tool in your path. Otherwise, you will end up with JSON formatted log output by default.
You can pass in an alternate logger if you wish. If you do not, then it will use bunyan by default. Your logger must expose the functions 'info', 'debug', 'warn', 'trace', 'error', and 'notice'.
When DNS was designed it was designed prior to the web existing, so many of the features in the RFC are either never used, or were never implemented. This server aims to be RFC compliant, but does not implement any other protocol other than INET (the one we're all used to), and only supports a handful of record types (the ones that are in use on a regular basis).
There are a few handy ways to lookup DNS records in node. https://github.com/LCMApps/dns-lookup-cache
FAQs
DNS server library for node.js
We found that node-named-fixed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.