hbo-dnsd (also known as dnsd) is a Node.js package providing functionalities for encoding and decoding DNS messages, as well as an API to run custom authoritative DNS servers. Currently at version 0.9.8, its development appears to have ceased around 2012, judging by the provided examples and the specified Node.js engine compatibility (>= 0.8). The package differentiates itself by offering direct programmatic control over DNS message structures as JavaScript objects, allowing developers to implement highly customized DNS resolution logic. It enables the creation of dynamic DNS responses based on request parameters, unlike static DNS server configurations. Due to its age, it relies solely on CommonJS modules and is not actively maintained, making it potentially incompatible with modern Node.js versions or ESM-first projects.
npm install hbo-dnsdVerified import paths — ran on the pinned version, not inferred.
Demonstrates creating a dynamic DNS server that responds to A and SOA queries with custom logic, including logging requests and setting dynamic TTLs.
This package is fundamentally incompatible with modern Node.js. Consider using a more actively maintained DNS library like 'dns-packet' for encoding/decoding or 'dnscat2' for server functionality if a custom DNS server is required. There is no direct fix to make this package work reliably on recent Node.js versions.
Ensure the file importing `hbo-dnsd` is treated as CommonJS (e.g., use `.cjs` file extension, or remove `"type": "module"` from `package.json`). If using ESM, a dynamic `import('dnsd')` might technically work in some contexts, but this package's synchronous nature makes it less suitable for such use.Do not use this package in production environments or for security-sensitive applications. Seek actively maintained alternatives that adhere to modern security practices and are regularly updated.
If deploying a DNS server on port 53, configure your system to allow the Node.js process to bind to privileged ports (e.g., using `setcap` on Linux), or use a port forwarding/redirection mechanism (e.g., `iptables`). Running the entire Node.js application as root is generally discouraged for security reasons.
Developers must either write their own declaration files (`declare module 'dnsd';` for basic usage, or more detailed interfaces for `req`, `res`, and server methods) or disable type checking for imports from this module.
Ensure the file where `require('dnsd')` is used is treated as a CommonJS module. This can involve changing the file extension to `.cjs` or ensuring `"type": "commonjs"` is set in the nearest `package.json` for that file's scope.Run the Node.js process with `sudo` (not recommended for production due to security implications) or configure system capabilities to allow non-root processes to bind to privileged ports. Alternatively, use a higher, unprivileged port (e.g., 5353) and configure network traffic redirection (e.g., `iptables` on Linux, or similar tools on other OS) from port 53 to the chosen unprivileged port.
This issue indicates deep incompatibility. The most effective fix is to migrate to a modern, actively maintained DNS library that supports current Node.js versions, as retrofitting this package for modern Node.js is impractical and risky.
No dependency data recorded yet.