
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Simple DNS Proxy written in Node.JS. Override hosts, domains, or tlds. Cache DNS response. Redirect certain domains to different nameservers.
Simple DNS Proxy written in Node.JS
Designed to allow you to override hosts or domains with specific answers or override tlds, or domains to use different nameservers. It has simple cache for speed up DNS responses. Useful for local/home usage or when using VPN connections with split DNS setups.
This app makes use of the rc module for configuration, the default configuration is below, use any file location to override the defaults. Appname is dnsproxy when creating a configuration file.
I can guarentee this app isn't perfect but fulfills my current needs for routing certain domains to private IP name servers when on VPN.
npm install -g dns-proxy
vim docker-compose.yml
vim conf.json
docker-compose up -d
For nameserver overrides if an answer isn't received by a threshold (350ms by default) DNS proxy will fallback to one of the default nameservers provided in the configuration (by default 8.8.8.8 or 8.8.4.4)
This will send all .com queries to 8.8.8.8 and .dk queries to 127.0.0.1 and custom port 54.
"servers": {
"com": "8.8.8.8",
"dk": "127.0.0.1:54"
}
This will match all google.com and its subdomains.
"servers": {
"google.com": "8.8.8.8"
}
This will match all of google.com and its subdomains and return 127.0.0.1 as the answer. This technically doens't even have to be a real domain or a full domain, if you configure ogle.com and do a lookup on google.com, the ogle.com will match.
"domains": {
"google.com": "127.0.0.1"
}
Queries: devlocal, devlocal.lan and devlocal.loc will match 127.0.0.1
"hosts": {
"devlocal": "127.0.0.1"
},
"hosts_sufixes": [
"lan",
"loc"
],
Domains and Hosts support aliases now, whereby you can define a host like normal such as "hi": "127.0.0.1" and in another entry reference it like "hello": "hi".
This is the default configuration in the application, you should override this by creating the proper rc file in one of the searchable paths.
{
"port": 8053,
"host": "127.0.0.1",
"logging": "dnsproxy:query,dnsproxy:info",
"nameservers": [
"8.8.8.8",
"8.8.4.4",
"8.8.8.8"
],
"servers": {},
"domains": {
"dev": "127.0.0.1"
},
"hosts": {
"devlocal": "127.0.0.1"
},
"hosts_sufixes": [
"lan",
"loc"
],
"fallback_timeout": 150,
"reload_config": true,
"maxTtl": 172800,
"minTtl": 300,
"nxdomainTtl": 600
}
Logging is handled by the simple lightweight debug package. By default all queries are logged. To change the logging output update the logging variable to any of the following: dns-proxy:error, dns-proxy:query, dns-proxy:debug. You can specify all or none, separate using a comma, a wildcard can be used as well.
You can copy the resources/launchd.plist file into /Library/LaunchDaemons as com.github.ekristen.dns-proxy.plist. To start just run sudo launchctl load /Library/LaunchDaemons/com.github.ekristen.dns-proxy.plist. This will also make the dns-proxy service to start on boot.
FAQs
Simple DNS Proxy written in Node.JS. Override hosts, domains, or tlds. Cache DNS response. Redirect certain domains to different nameservers.
We found that dns-proxy2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.