DNS switch between multiple providers
-
Install Node + Npm
Node: installation guide
-
Clone git project
# run command in your working directory git clone https://github.com/PotRemus/dns-proxy.git cd dns-proxy
-
Install dependencies
# install the dependencies npm install
-
Set DNS configuration
Open json file
./src/settings.json
and set your DNS configuration.Example:
{ "servers": [ { "address": "8.8.8.8", // Google DNS "port": 53, "type": "udp" }, { "address": "x.x.x.x", // Alternate DNS "port": 53, "type": "udp" } ] }
-
Start developing
# "start": "node src/dns-server.js" npm start
-
Configure your DNS network adapter
Set the DNS server for your network adapter with a local IP address (127.0.0.1)
It's only tested with windows service system, if you need more information for the other system you could find documentation in node-windows guide
-
Link node-windows
npm link node-windows
-
Install Service
# "install-service": "node install-service.js" npm run install-service
```sh
# "uninstall-service": "node uninstall-service.js"
npm run uninstall-service
```
Proxy Dns: https://peteris.rocks/blog/dns-proxy-server-in-node-js-with-ui/
node-windows: https://github.com/coreybutler/node-windows