Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
DNS Switcher script
CoffeeScript JavaScript
tag: v0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
completions
lib
test
.gitignore
.travis.yml
LICENSE-MIT
README.md
package.json

README.md

DNS Switcher

Build Status

Quickly switch between DNS profiles

(currently only supports Mac)

Installation

npm install -g dns-switcher

to add zsh completions:

dns --completions >> ~/.zshrc

NOTE: If you're using the completions and you get a warning about insecure directories it's because the owner of the directory ".../node/.../lib/node_modules/dns/completions" should be either the root user or the current user.

Configuration

Create a file named '.dns.coffee' in your home directory:

module.exports =
  profile1:
    nameservers: [ '1.2.3.4', '5.6.7.8' ]
  profile2:
    nameservers: [ '7.8.9.10' ]
    search_domains: [ 'domain1', 'domain2' ]

Usage

# show the names of the profiles specified in ~/.tailr.coffee
dns --list
dns -l

# load a profile
dns profile1

# reset the dns settings
dns --reset
dns -r

# show the current dns settings
dns

# By default, it uses the "Wi-Fi" device,
# you can specifiy a different device like this:
dns -d Ethernet1 profile1
Something went wrong with that request. Please try again.