Dead simple DNS server using syntax similar to hosts file.
hosts works well, until:
- you need wildcard-based rules like
127.0.0.1 *.local-service
. - you need ban rules like
-example.com
. - you need to share records in the hosts file to other devices.
- you don't want to have to request administrator or root privileges every time you edit it.
better-hosts solves these problems by creating a DNS server that uses the hosts file.
npm install --global better-hosts
# or
yarn global add better-hosts
Usage: better-hosts [options] <filename>
Options:
-V, --version output the version number
--fallback-server <server>
--timeout <seconds> (default: "30")
--port <port> (default: "53")
--log <level> (default: "info")
-h, --help display help for command
Example:
better-hosts hosts.txt \
--fallback-server=1.1.1.1:53