![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.
dns-over-tls
Advanced tools
dns-over-tls
is a Node.js DNS-over-TLS API. Here's a blog post that explains how it works.
$ npm install dns-over-tls
We import as follows:
const dnstls = require('dns-over-tls')
All API usages return a Promise
that resolves to a DNS
response object.
(async () => {
const dnsResponse = await dnstls.query('sagi.io')
})()
Sends a DNS-over-TLS request of domain name
'sagi.io'
to
Cloudflare's
dns-over-tls
server (host
is '1.1.1.1'
and servername
is 'cloudflare-dns.com'
).
(async () => {
const dnsResponse = await dnstls.query('9.9.9.9', 'dns.quad9.net', 'sagi.io')
})()
Sends a DNS-over-TLS request of domain name
'sagi.io'
to host
'9.9.9.9'
with
servername
'dns.quad9.net'
.
Allows for more advanced DNS
queries.
(async () => {
const options = {
name: 'authors.bind',
host: '145.100.185.15',
servername: 'dnsovertls.sinodun.com',
klass: 'CH',
type: 'TXT'
};
const dnsResponse = await dnstls.query(options)
})
Sends a DNS-over-TLS request of domain name
'authors.bind'
to host
'145.100.185.15'
with
servername
'dnsovertls.sinodun.com'
, class
'CH'
and type 'TXT'
.
Say we'd like to get the NS
records of domain sagi.io
:
const options = {
name: 'sagi.io',
host: '1.1.1.1',
servername: 'cloudflare-dns.com',
type: 'NS',
};
const dnsResponse = await dnstls.query(options);
console.log(JSON.stringify(dnsResponse, null, 2));
Code from example
.
Output:
{
"id": 46597,
"type": "response",
"flags": 384,
"flag_qr": true,
"opcode": "QUERY",
"flag_aa": false,
"flag_tc": false,
"flag_rd": true,
"flag_ra": true,
"flag_z": false,
"flag_ad": false,
"flag_cd": false,
"rcode": "NOERROR",
"questions": [
{
"name": "sagi.io",
"type": "NS",
"class": "IN"
}
],
"answers": [
{
"name": "sagi.io",
"type": "NS",
"ttl": 10703,
"class": "IN",
"flush": false,
"data": "cass.ns.cloudflare.com"
},
{
"name": "sagi.io",
"type": "NS",
"ttl": 10703,
"class": "IN",
"flush": false,
"data": "dave.ns.cloudflare.com"
}
],
"authorities": [],
"additionals": []
}
MIT
FAQs
dns-over-tls for node
We found that dns-over-tls 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.