Comparing version 0.1.1 to 0.2.0
{ | ||
"name": "dns-proxy", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Simple DNS Proxy written in Node.JS. Override hosts, domains, or tlds. Redirect certain domains to different nameservers.", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -7,16 +7,24 @@ # DNS Proxy | ||
This app makes use of the [rc](https://www.npmjs.com/package/rc) module for configuration, the default configuration is below, use any file location to override the defaults. | ||
This app makes use of the [rc](https://www.npmjs.com/package/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. | ||
## Roadmap | ||
* Improve configuration logging locations (ie file vs stdout) | ||
* Service scripts for Linux and OSX | ||
## Examples | ||
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) | ||
### TLD Specific Nameserver | ||
This will send all .com queries to 8.8.8.8 | ||
``` | ||
servers: { | ||
'com': '8.8.8.8 | ||
```json | ||
"servers": { | ||
"com": "8.8.8.8" | ||
} | ||
``` | ||
* This is a snippet that will go into your rc config file. | ||
@@ -26,13 +34,14 @@ ### Domain Specific Nameserver | ||
This will match all google.com and its subdomains. | ||
``` | ||
servers: { | ||
'google.com': '8.8.8.8' | ||
```json | ||
"servers": { | ||
"google.com": "8.8.8.8" | ||
} | ||
``` | ||
* This is a snippet that will go into your rc config file. | ||
### Domain Specific Answers | ||
This will match all of google.com and its subdomains and return 127.0.0.1 as the answer. | ||
``` | ||
domains: { | ||
'google.com': '127.0.0.1' | ||
```json | ||
"domains": { | ||
"google.com": "127.0.0.1" | ||
} | ||
@@ -43,3 +52,4 @@ ``` | ||
## Default Configuration | ||
``` | ||
This is the default configuration in the application, you should override this by creating the proper rc file in one of the searchable paths. | ||
```js | ||
{ | ||
@@ -68,1 +78,6 @@ port: 53, | ||
## Running as a Service | ||
### OSX | ||
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. |
@@ -19,2 +19,3 @@ var opts = require('rc')('dnsproxy', { | ||
process.env.DEBUG_FD = process.env.DEBUG_FD || 1; | ||
process.env.DEBUG = process.env.DEBUG || opts.logging; | ||
@@ -21,0 +22,0 @@ var d = process.env.DEBUG.split(',') |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8753
8
114
80
7