A DNS server app written by pure Nodejs for develop and test use. Only support IPv4 now.
To resolve specified domain name to specified IP using keyword-matching algorithm. Useful for frontend developer and tester when involved into a website project.
A local DNS server written purely in Nodejs for development and testing.
When building a website on the front end, local development usually uses nginx or nodejs as the server, and then uses the IP address (127.0.0.1 or localhost) in the browser to open the website. But some functions require a domain name (or second-level domain name) to work, so you can use this tool to do local analysis and point to the specified IP for domain name queries that match the keywords.
Please pay attention to the URL address in each picture. In fact, hursing.com
does not exist. Please look at the url and know that the hursing.com
does not exist actually.
Follow the diagram to find the original DNS server address and change it to 127.0.0.1
. Follow the steps, find the original dns server and change it to 127.0.0.1
.
before change:
After change:
View the original dns server addressview the original dns server:
before change:
After change:
Open open index.js
:
Modify the code above modify the code
fallbackServer
to your original dns server address change fallbackServer
to your original dns server addressdomain
to domain
keyword of your expected domain nametargetIp
to the resolved IP change targetIp
to the resolved IP Then run then run node index.js
. Required on mac you have to run sudo node index.js
.
DNS protocol: https://tools.ietf.org/html/rfc1035