Skip to content

Releases: gibme-npm/dns

v22.0.0

03 Apr 20:07
32087e8

Choose a tag to compare

What's Changed

  • Node.js >= 22: Minimum Node.js version bumped to 22
  • Test framework: Migrated from Mocha/ts-node to node:test/tsx
  • TypeScript target: Updated from ES6 to ES2024, removed deprecated tsconfig options
  • CI/CD: Migrated npm publishing to OIDC trusted publishing, bumped GitHub Actions to v4
  • Dependencies: Updated @gibme/bytepack to ^22.0.1, regenerated lockfile with 0 vulnerabilities
  • README: Added badges, additional usage examples, and improved structure

v20.0.4

13 Dec 19:26
47f0ff9

Choose a tag to compare

DNS packet encoding & decoding in an abstract way

Documentation

https://gibme-npm.github.io/dns/

Features

This package is designed to encode & decode DNS packets whether they are being transmitted via:

  • UDP
    • Unicast or Multicast
  • TCP
  • DNS over TLS
  • DNS over HTTPs

Includes support for:

  • Full support for Multicast DNS:
    • qu bit - Requesting unicast responses
    • flush bit - Requesting clearing of cached entries
  • The following record types:
    • A
    • AAAA
    • AFSDB
    • AMTRELAY
    • AVC
    • CAA
    • CDNSKEY
    • CDS
    • CERT
    • CNAME
    • CSYNC
    • DHCID
    • DNAME
    • DNSKEY
    • DOA
    • DS
    • EUI48
    • EUI64
    • HINFO
    • IPSECKEY
    • KX
    • LOC
    • MX
    • NAPTR
    • NS
    • NSEC
    • NSEC3
    • NSEC3PARAM
    • OPENPGPKEY
    • OPT
    • PTR
    • RP
    • RRSIG
    • SMIMEA
    • SOA
    • SRV
    • SSHFP
    • SVCB
    • TKEY
    • TLSA
    • TSIG
    • TXT
    • URI
    • ZONEMD
    • Any others supported via Unsupported that provides the payload in Buffer form

Sample Code

Encoding

import { Query } from '@gibme/dns';

const query = new Query({
    id: 0,
    questions: [{
        type: 'A',
        name: 'google.com'
    }]
})

socket.send(query.buffer);

Decoding

import { Packet } from '@gibme/dns';

const packet = new Packet(buffer);

console.log(packet);

v20.0.3

30 Aug 20:38
b9ad228

Choose a tag to compare

DNS packet encoding & decoding in an abstract way

Documentation

https://gibme-npm.github.io/dns/

Features

This package is designed to encode & decode DNS packets whether they are being transmitted via:

  • UDP
    • Unicast or Multicast
  • TCP
  • DNS over TLS
  • DNS over HTTPs

Includes support for:

  • Full support for Multicast DNS:
    • qu bit - Requesting unicast responses
    • flush bit - Requesting clearing of cached entries
  • The following record types:
    • A
    • AAAA
    • AFSDB
    • AMTRELAY
    • AVC
    • CAA
    • CDNSKEY
    • CDS
    • CERT
    • CNAME
    • CSYNC
    • DHCID
    • DNAME
    • DNSKEY
    • DOA
    • DS
    • EUI48
    • EUI64
    • HINFO
    • IPSECKEY
    • KX
    • LOC
    • MX
    • NAPTR
    • NS
    • NSEC
    • NSEC3
    • NSEC3PARAM
    • OPENPGPKEY
    • OPT
    • PTR
    • RP
    • RRSIG
    • SMIMEA
    • SOA
    • SRV
    • SSHFP
    • SVCB
    • TKEY
    • TLSA
    • TSIG
    • TXT
    • URI
    • ZONEMD
    • Any others supported via Unsupported that provides the payload in Buffer form

Sample Code

Encoding

import { Query } from '@gibme/dns';

const query = new Query({
    id: 0,
    questions: [{
        type: 'A',
        name: 'google.com'
    }]
})

socket.send(query.buffer);

Decoding

import { Packet } from '@gibme/dns';

const packet = new Packet(buffer);

console.log(packet);